Capistrano for Rails 3.1
我正在使用 Rails 3.1 和 Capistrano,我收到
No such file or directory
/public/images、/public/stylesheets 和 public/javascripts 错误的
错误。在互联网上搜索后,我发现了许多博客文章建议
set :normalize_asset_timestamps, false
可以解决这些问题。但是,我不确定我是否在做 正确的事情,因为预编译仍然失败,而且我是 Rails 3.1 的新手。
rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile
在生产服务器上仍然失败。
我
load 'deploy/assets'
set :rake, "bundle exec rake"
在deploy.rb中设置但没有帮助。仍然 cap 部署抱怨它找不到某些宝石,
提前感谢您的帮助。
史蒂夫
I am using Rails 3.1 and Capistrano, I get
No such file or directory
errors for /public/images, /public/stylesheets, and public/javascripts
errors. Searching the Internet, I found a number of blog posts suggesting
set :normalize_asset_timestamps, false
which removed these problems. However, I am not sure if I am doing
the right thing since precompile still fails and I am new to Rails 3.1.
rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile
still fails on the production server.
I set
load 'deploy/assets'
set :rake, "bundle exec rake"
in deploy.rb but it doesn't help. Still cap deploy complains that it cannot find certain gems
Thanks in advance for any help.
Steve
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这确实为我解决了错误。如果您使用的是捆绑器和 rvm,请确保您的设置正确。可以通过快速谷歌 rvm capistrano 或 rvm bundler 找到更多信息,但我在deploy.rb中的设置如下:
对于 RVM,我的设置是:
我的捆绑器设置是:
That does indeed fix the error for me. If you're using bundler and rvm make sure your settings are correct. More info can be found with a quick google of rvm capistrano or rvm bundler but my settings in deploy.rb are below:
For RVM my settings are:
My bundler settings are: