I want to bring up a staging environment on a server. I am currenly using capistrano to deploy.
I made the changes for the ext/multistage extension but am getting the following error:
# Add RVM's lib directory to the load path.
* executing "cd /data/sites/staging.domain.com/apps/app/releases/20120501225426 && rake RAILS_ENV=production db:migrate"
servers: ["173.111.158.135"]
[173.111.158.135] executing command
*** [err :: 173.111.158.135] rake aborted!
*** [err :: 173.111.158.135] Could not find rake-0.9.2.2 in any of the sources
*** [err :: 173.111.158.135]
*** [err :: 173.111.158.135] (See full trace by running task with --trace)
*** [err :: 173.111.158.135]
command finished in 1332ms
failed: "rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell '1.9.2' -c 'cd /data/sites/staging.domain.com/apps/app/releases/20120501225426 && rake RAILS_ENV=production db:migrate'" on 173.111.158.135
In my gemfile I have:
gem 'rake', '0.9.2.2'
on my local machine, I get:
Tue May 01$ rake -V
rake, version 0.9.2.2
Tue May 01$
on server, I have:
#rake -V
rake, version 0.9.2
#rake
Could not find rake-0.9.2.2 in any of the sources
Run `bundle install` to install missing gems.
If I run the following:
# which ruby
/usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby
# which rake
/usr/local/rvm/gems/ruby-1.9.2-p290/bin/rake
# /usr/local/rvm/gems/ruby-1.9.2-p290/bin/rake -V
rake, version 0.9.2
The cap error seems a little cryptic. Can anyone help me figure this out? Why would my other cap script be working if I have 0.9.2.2 specified and it only has 9.2? Is there a way that I need to force capistrano to install rake 0.9.2.2 that I am not currently doing and how would I do this?
thx
That error comes up usually when you forget to
bundle exec rails somethingfor instance. Does capistrano ask/want a bundle command to bundle install these gems maybe?EDIT:
Yeah I bet your project isn’t expecting this:
rake RAILS_ENV=production db:migratebut maybebundle exec rake RAILS_ENV=production db:migrate.I’m unsure how you setup your cap however.
This is a rails 3 project yeah?