Rails 2.3.5 to 2.3.8 bundler error

157 views
Skip to first unread message

Bharat

unread,
Aug 10, 2010, 10:17:30 PM8/10/10
to ruby-bundler
I am trying to upgrade my Rails 2.3.5 to Rails 2.3.8 (so that I can
upgrade to Rails 3.0 easily). I am using RVM and have installed Ruby
1.9.2-head to work with Rails 3. I already had installed Ruby 1.8.7
before installing RVM to I have made 1.8,7 my system installation.
Currently, I am working with Ruby 1.8.7 set as default.

Here is the output of gem list command:
→ gem list

*** LOCAL GEMS ***

bundler (0.9.26)
rake (0.8.7)

So when I try to start script/console, I get the following error:

→ ./script/console
Loading development environment (Rails 2.3.8)
/home/bruparel/rr_work/file_manager/config/../config/preinitializer.rb:
5:RuntimeError: Could not load the bundler gem. Install it with `gem
install bundler`.
/home/bruparel/.bundle/ruby/1.8/gems/rails-2.3.8/lib/rails/
backtrace_cleaner.rb:2:NameError: uninitialized constant
ActiveSupport::BacktraceCleaner
/home/bruparel/.bundle/ruby/1.8/gems/rails-2.3.8/lib/
console_with_helpers.rb:5:NameError: uninitialized constant
ApplicationController

Here is my config/preinitializer.rb file:


begin
2 require "rubygems"
3 require "bundler"
4 rescue LoadError
5 raise "Could not load the bundler gem. Install it with `gem
install bundler`."
6 end
7
8 if Gem::Version.new(Bundler::VERSION) <=
Gem::Version.new("0.9.24")
9 raise RuntimeError, "Your bundler version is too old." +
10 "Run `gem install bundler` to upgrade."
11 end
12
13 begin
14 # Set up load paths for all bundled gems
15 ENV["BUNDLE_GEMFILE"] = File.expand_path("../../Gemfile",
__FILE__)
16 Bundler.setup
17 rescue Bundler::GemNotFound
18 raise RuntimeError, "Bundler couldn't find some gems." +
19 "Did you run `bundle install`?"
20 end

This is straight out of the bundler site?

What am I doing wrong?

Please advise.

Thanks.

Bharat

Andre Arko

unread,
Aug 11, 2010, 1:13:00 AM8/11/10
to ruby-b...@googlegroups.com
On Aug 10, 2010, at 7:17 PM, Bharat wrote:
> What am I doing wrong?

Sounds like there's some sort of weird RVM issue going on. Try `rvm implode` and see if it works with system ruby?

— Andre

Reply all
Reply to author
Forward
0 new messages