我想在服务器上启动一个暂存环境。我目前正在使用capistrano进行部署。
我对ext/multistage扩展进行了更改,但得到以下错误:
# 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在我的gemfile中,我有:
gem 'rake', '0.9.2.2'在我的本地机器上,我得到:
Tue May 01$ rake -V
rake, version 0.9.2.2
Tue May 01$在服务器上,我有:
#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.如果我运行以下命令:
# 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.2cap错误看起来有点神秘。有人能帮我解决这个问题吗?如果我指定了0.9.2.2,而它只有9.2,为什么我的另一个cap脚本可以工作?有没有一种方法需要强制capistrano安装rake 0.9.2.2,而我目前没有这样做?我该怎么做?
thx
发布于 2012-05-02 08:00:31
例如,当您忘记bundle exec rails something时,通常会出现该错误。capistrano会要求/想要一个捆绑命令来捆绑安装这些gem吗?
编辑:是的,我打赌你的项目不会期望这个:rake RAILS_ENV=production db:migrate,但可能是bundle exec rake RAILS_ENV=production db:migrate。
但是我不确定你是如何设置你的帽子的。
这是一个rails 3项目,对吗?
https://stackoverflow.com/questions/10405983
复制相似问题