Cannot Access Rails Console for Passenger Deployed Application Using Capistrano & RVM

After I can run the Rails application, I ran into a problem with a little difficulty. I applied the Rails 3.0.5 application to an Ubuntu 10.10 server with Capistrano, RVM, and Nginx. Everything works well, and I can confirm that Rails works when I get data from the database and meaningful log messages.

The problem is that on the server I cannot access the console. When i try

rails c

It says: "Currently, the" rails "of the program are not installed. To start the" rails ", ask your administrator to install the" rails "package

However, it is installed, otherwise my application will not work! I have only two RVM sets, global and one called rails305. Attempt

rvm gemset use rails305

then

gem list

It does not display any of the gems that my application requires, but they must be installed, because 1) the application will not work without them, and 2) in my deployment of the Capistrano script, the picker installs them (on this gemset). So the problem is obviously related to RVM, but I can't figure out what it is ... any ideas?

+5
source share
2 answers

It seems that Capistrano is using bundler, so you can try

bundle exec rails c

from the deployment directory.

. Bundler.

+16

Bundler gems rvm capistrano, "shared/bundle", , RVM. RVM , /gemset ( , , rake, ..), config/deploy.rb:

set :bundle_dir, ""
set :bundle_flags, ""

"-deployment" ( "-quiet", ) -path, , RVM; ( ).

0

All Articles