我只使用rails 5 api,只使用应用程序。当我试图部署这个应用程序时,会出现错误
Tasks: TOP => deploy:assets:precompile
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as deploy@xxx.xxx.xxx: rake exit status: 1
rake stdout: Nothing written
rake stderr: rake aborted!
Don
我尝试使用capistrano部署我的rails 3.1应用程序,但失败了,输出如下:
rake aborted!
File name too long - /srv/good2go.ch/cookbook/releases/20110727063856/tmp/cache/assets/sprockets%2Fsrv%2Fgood2go.ch%2Fcookbook%2Fshared%2Fbundle%2Fruby%2F1.9.1%2Fgems%2Faloha_rails-0.1.4%2Flib%2Fassets%2Fjavascripts%2Faloha%2Fplugins%2Fcom.g
我正在尝试将我的Rails应用程序部署到生产服务器上,我决定使用DigitalOcean + 将其部署到Rails中。
要部署,我使用以下命令:
cap production deploy
但是,它在某些需要some文件的地方失败了。下面是失败部署的日志:
DEBUG[323dfd0e] Command: cd /home/deploy/zwiadowcy/releases/20140628164657 && ~/.rvm/bin/rvm default do bundle install --binstubs /home/deploy/zwiadowcy/shared/bin
我做了一个新的Rails 3.2应用程序。当我使用Capistrano部署它时,我在编译资源时得到一个错误。但是资产被编译了,应用程序按照它应该的方式进行了部署。
在服务器上,我在系统范围内安装了RVM,然后创建了:
User: skolemapicture (added to group rvm)
Deploy folder: /home/skolemapicture/site
.rvmrc in /home/skolemapicture/site/.rvmrc
我的deploy.rb配置如下所示(省略了与问题无关的行)
set :application, "skolemapict
我正在尝试第一次设置Capistrano部署,并且我想在我的开发目录中测试它,然后再在生产中尝试它。通常,我甚至不会在dev环境中使用Capistrano,但是我在部署时遇到了问题。看来卡皮斯特拉诺想:
A)运行bundle命令:bundle --without development test
和
B)在开发环境中运行rake assets:precompile。我不想这样。我为什么要这么做?如果我想这样做的话,也许在“阶段性”环境中,但肯定不是在开发模式中。
目前最大的障碍是它捆绑了认为它处于生产模式,因此跳过了当它在预编译资产时正确地使用开发环境时所需要的宝石。
编辑:下面是两个正在运行
我将这一行的load 'deploy/assets'添加到我的Capfile中,以便使用Rails3.1部署资产。
Capistrano到了这一行
* executing "cd /home/deploy/armonia/stage/releases/20110928021521 && bundle exec rake RAILS_ENV=stage RAILS_GROUPS=assets assets:precompile"
然后失败,返回
Could not find multi_json-1.0.3 in any of the source
当尝试使用Capistrano 3.0.1进行部署时,我会得到以下错误:
cap aborted!
Don't know how to build task 'starting'
/Users/user/.rvm/gems/ruby-2.0.0-p353/gems/capistrano-3.0.1/lib/capistrano/dsl/task_enhancements.rb:5:in `before'
/Users/user/.rvm/gems/ruby-2.0.0-p353/gems/capistrano-rails-1.1.0/lib/capistrano
TLDR;
我已经使用Capistrano部署了一年多,并且能够回滚,现在突然我不能回滚了,因为它找不到rake资产文件
问题
Capistrano Rollback失败了,它抱怨说它找不到我验证的rake资产清单不在那里。是什么创造了它,为什么它会停止被创建?
几天来,我一直在绞尽脑汁地解决这个问题,现在我想弄清楚如何处理回滚的那一部分,并手动重新编译资产。
回滚控制台输出
rvm 1.27.0 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com
我使用Capistrano部署了一个使用mysql2适配器的Rails 3.2.1应用程序。
该应用程序在windows上在本地运行良好,但当我试图部署到linux服务器时,Capistrano抛出以下错误:
Please install the mysql2 adapter: gem install activerecord-mysql2-adapter (mysql2 is not part of the bundle. Add it to Gemfile.)
请注意,我正在GIT上跟踪Gemfile.lock,但我注意到:
...
mysql2 (0.3.11-x86-mingw32)