Rails Edge: gem bundle error

Hi.

Having installed Ruby 1.9 from source, I decided to have a look at Rails3 aka Rails edge from git. Therefore, I followed wycats instructions (http://weblog.rubyonrails.org/2010/1/1/getting-a-new-app- running-on-edge), but keep getting an error related to Bundler:

$ sudo gem bundle --backtrace ERROR: While executing gem ... (NoMethodError)     undefined method `path' for #<Bundler::Dsl:0x9583f20>   /opt/src/rails/Gemfile:1:in `evaluate'   /opt/ruby1.9/lib/ruby1.9/gems/1.9.1/gems/bundler-0.8.1/lib/bundler/ dsl.rb:9:in `instance_eval'   /opt/ruby1.9/lib/ruby1.9/gems/1.9.1/gems/bundler-0.8.1/lib/bundler/ dsl.rb:9:in `evaluate'   /opt/ruby1.9/lib/ruby1.9/gems/1.9.1/gems/bundler-0.8.1/lib/bundler/ bundle.rb:33:in `initialize'   /opt/ruby1.9/lib/ruby1.9/gems/1.9.1/gems/bundler-0.8.1/lib/bundler/ bundle.rb:14:in `new'   /opt/ruby1.9/lib/ruby1.9/gems/1.9.1/gems/bundler-0.8.1/lib/bundler/ bundle.rb:14:in `load'   /opt/ruby1.9/lib/ruby1.9/gems/1.9.1/gems/bundler-0.8.1/lib/bundler/ cli.rb:36:in `initialize'   /opt/ruby1.9/lib/ruby1.9/gems/1.9.1/gems/bundler-0.8.1/lib/bundler/ cli.rb:6:in `new'   /opt/ruby1.9/lib/ruby1.9/gems/1.9.1/gems/bundler-0.8.1/lib/bundler/ cli.rb:6:in `run'   /opt/ruby1.9/lib/ruby1.9/gems/1.9.1/gems/bundler-0.8.1/lib/bundler/ commands/bundle_command.rb:68:in `execute'   /opt/ruby1.9/lib/ruby1.9/gems/1.9.1/gems/rubygems-update-1.3.5/lib/ rubygems/command.rb:257:in `invoke'   /opt/ruby1.9/lib/ruby1.9/gems/1.9.1/gems/rubygems-update-1.3.5/lib/ rubygems/command_manager.rb:132:in `process_args'   /opt/ruby1.9/lib/ruby1.9/gems/1.9.1/gems/rubygems-update-1.3.5/lib/ rubygems/command_manager.rb:102:in `run'   /opt/ruby1.9/lib/ruby1.9/gems/1.9.1/gems/rubygems-update-1.3.5/lib/ rubygems/gem_runner.rb:58:in `run'   /usr/local/bin/gem:21:in `<main>'

Ruby's fine:

$ ruby -v ruby 1.9.1p376 (2009-12-07 revision 26041) [i686-linux]

Rubygem configuration is that of a mint installation of Ruby 1.9 (gemcutter gem is installed):

$ gem env RubyGems Environment:   - RUBYGEMS VERSION: 1.3.5   - RUBY VERSION: 1.9.1 (2009-12-07 patchlevel 376) [i686-linux]   - INSTALLATION DIRECTORY: /opt/ruby1.9/lib/ruby1.9/gems/1.9.1   - RUBYGEMS PREFIX: /opt/ruby1.9/lib/ruby1.9/gems/1.9.1/gems/rubygems- update-1.3.5   - RUBY EXECUTABLE: /opt/ruby1.9/bin/ruby1.9   - EXECUTABLE DIRECTORY: /opt/ruby1.9/bin   - RUBYGEMS PLATFORMS:     - ruby     - x86-linux   - GEM PATHS:      - /opt/ruby1.9/lib/ruby1.9/gems/1.9.1      - /home/jd/.gem/ruby/1.9.1   - GEM CONFIGURATION:      - :update_sources => true      - :verbose => true      - :benchmark => false      - :backtrace => false      - :bulk_threshold => 1000      - "install" => "-B 10"      - :sources => ["RubyGems.org | your community gem host, "http:// gems.github.com", "RubyGems.org | your community gem host]      - "update" => "-B 10"   - REMOTE SOURCES:      - http://gems.rubyforge.org/      - http://gems.github.com      - http://gems.rubyforge.org/

Does anyone has a hint on this?

Thank you!

The fix was quicker than I expected :slight_smile:

Bundler has been revamped as a binary, so wycats instructions are invalid now.

To get rails edge rolling, one must do : (sudo) gem uninstall bundler (sudo) gem install bundler --prerelease cd to/your/rails/app/ bundle install

More information: http://github.com/carlhuda/bundler/issues/#issue/1

I let a comment on the Rails blog as well.

More information about the new structure of Bundler:

For the sake of information (maybe it'll be useful to some of you lurking for information on Rails 3 but following neither the commits or rubyonrails-core mailing list), note that Rails edge does not have a script/* structure anymore. The new way to go is to use the rails command provided as script/rails (the main rails system command eventually aliases to it) and some arguments (generate, server, etc.).

Say, if one wants to launch WEBRick or Mongrel : ruby rails server -- env PRODUCTION