Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why am I getting this bundler error in an existing project that uses Heroku?

This error happens during just about any rake task:

project/Gemfile:4:in `evaluate': undefined method `ruby' for #<Bundler::Dsl:0x007f8274ba6ac8> (NoMethodError)
~/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.4/lib/bundler/dsl.rb:7:in `instance_eval'
~/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.4/lib/bundler/dsl.rb:7:in `evaluate'
~/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.4/lib/bundler/definition.rb:18:in `build'
~/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.4/lib/bundler.rb:135:in `definition'
~/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.4/lib/bundler/cli.rb:220:in `install'
~/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.4/lib/bundler/vendor/thor/task.rb:22:in `run'
.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.4/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'

Gemfile:4

  ruby '1.9.3'
like image 596
Peter DeWeese Avatar asked Jun 01 '12 19:06

Peter DeWeese


1 Answers

This line is required for running multiple versions of ruby on Heroku, but currently requires a prerelease version of bundler to work locally.

gem install bundler --pre

See http://blog.heroku.com/archives/2012/5/9/multiple_ruby_version_support_on_heroku/

like image 167
Peter DeWeese Avatar answered Nov 09 '22 23:11

Peter DeWeese