Sqlite gem not found with rails3

Hello,

I am migrating a rails app to rails3, however I am hanging with an error about gem not found.

   Error message:    Could not find sqlite3-ruby-1.3.2 in any of the sources (Bundler::GemNotFound)    Exception class:    PhusionPassenger::UnknownError

When I do

   $ gem list sqlite3-ruby-1.3.2    *** LOCAL GEMS ***   (and the same result with sudo gem list )

However, when I do

   gem list sqlite3-ruby    *** LOCAL GEMS ***    sqlite3-ruby (1.3.2, 1.3.0)

How can I make rails3/passenger environment see the right gems? How can I make sure that passenger calls the right ruby environment?

The stack trace from the error is:

  0 /usr/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/ spec_set.rb 87 in `materialize'   1 /usr/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/ spec_set.rb 81 in `map!'   2 /usr/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/ spec_set.rb 81 in `materialize'   3 /usr/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/ definition.rb 93 in `specs'   4 /usr/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/ definition.rb 137 in `specs_for'   5 /usr/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/ definition.rb 126 in `requested_specs'   6 /usr/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/ environment.rb 23 in `requested_specs'   7 /usr/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/ runtime.rb 11 in `setup'   8 /usr/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler.rb 100 in `setup'   9 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/ utils.rb 222 in `setup_bundler_support'   10 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/ phusion_passenger/rack/application_spawner.rb 105 in `run'   11 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/ phusion_passenger/utils.rb 323 in `report_app_init_status'   12 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/ phusion_passenger/rack/application_spawner.rb 87 in `run'   13 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/ phusion_passenger/rack/application_spawner.rb 65 in `spawn_application'   14 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/ phusion_passenger/utils.rb 252 in `safe_fork'   15 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/ phusion_passenger/rack/application_spawner.rb 58 in `spawn_application'   16 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/ phusion_passenger/rack/application_spawner.rb 41 in `spawn_application'   17 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/ phusion_passenger/spawn_manager.rb 150 in `spawn_application'   18 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/ phusion_passenger/spawn_manager.rb 278 in `handle_spawn_application'   19 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/ phusion_passenger/abstract_server.rb 352 in `__send__'   20 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/ phusion_passenger/abstract_server.rb 352 in `main_loop'   21 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/ phusion_passenger/abstract_server.rb 196 in `start_synchronously'   22 /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/bin/passenger- spawn-server 61

Hello,

try these ways:

1. reinstall your Runygem; waht is your version now for "gem -v"? If you have Ruby 1.9 ("ruby -v"), you should have 1.3.7, with Ruby 1.8 Gem1.3.5. I suggest use the updated versions.

2. Do you used your "gem 'sqlite3-ruby'" in your Gemfile, and then run bundle install?

3. Use RVM. http://rvm.beginrescueend.com/ Here your problem is your gem path is still for older version of Ruby (I assume that you updated). With RVM you can have multiple versions, and all confusion will disappear.

If you have further problem with it write me in private with these details please: ruby -v, gem -v, gem list, OS. Good luck, Zoltan