Reputation: 905
LoadError: no such file to load -- bundler/setup
Trying to deploy a rails app as a .war
I can get it running via command line as my deploy user, but starting the app server as root when the machine boots lead to the error.
I've set my GEM_HOME in /etc/environment but it doesn't help.
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.9
- RUBY VERSION: 1.9.2 (2011-10-17 patchlevel 136) [java]
- INSTALLATION DIRECTORY: /usr/local/rbenv/versions/jruby-1_6-latest/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/local/rbenv/versions/jruby-1_6-latest/bin/jruby
- EXECUTABLE DIRECTORY: /usr/local/rbenv/versions/jruby-1_6-latest/bin
- RUBYGEMS PLATFORMS:
- ruby
- universal-java-1.6
- GEM PATHS:
- /usr/local/rbenv/versions/jruby-1_6-latest/lib/ruby/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- "install" => "--no-rdoc --no-ri --env-shebang"
- "update" => "--no-rdoc --no-ri --env-shebang"
- REMOTE SOURCES:
- http://rubygems.org/
Upvotes: 1
Views: 1255
Reputation: 11
I had similar issue building a war file for Tomcat, via jruby -S warble
- error message was:
warning: skipping bundler (d:/builders3/jruby-1.5.6/lib/ruby/gems/1.8/gems/gems/bundler-1.0.15 does not exist
(That "gems/gems" part, btw, is bogus; not sure how it constructed that path.)
The war file (apparently) got built, but in trying to deploy to Tomcat it gives severe error:
can't find bundler/setup
.
My environment: JRuby 1.5.6, Ruby 1.8.7, Rails 3.0.15. gem - v #=> 1.3.6.
I finally got this to both build the war file properly and deploy - the key change was to set warbler to 1.3.2 in Gemfile, and run "bundle exec warble".
Upvotes: 1
Reputation: 905
This ended up being an issue with Warbler, specifically Warbler makes some assumptions about which version of Rubygems you're using.
If you're using latest stable Warbler (1.3.2), use JRuby 1.6.4. If you are using JRuby 1.6.5, use the latest Warbler from github.
Upvotes: 1