- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
我正在尝试正确使用 Capistrano 和 RVM,以便将我的 Ruby on Rails 3.2.2 应用程序部署到运行 Ubuntu 10.04 LTS 的远程机器上。我接缝解决了我之前与“Rvm - Capistrano integration on Linux Ubuntu”相关的问题。但是,在部署时我收到以下与 DelayedJob gem 相关的错误:
...
* executing "cd /srv/www/<APP_NAME>/releases/20120314135318 && bundle install"
servers: ["<DOMAIN>"]
[<DOMAIN>] executing command
[<DOMAIN>] rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell 'ruby-1.9.3-p125' -c 'cd /srv/www/<APP_NAME>/releases/20120314135318 && bundle install' ** [out :: <DOMAIN>] Using rake (0.9.2.2)
** [out :: <DOMAIN>] Using builder (3.0.0)
...
** [out :: <DOMAIN>] Using daemons (1.1.8)
** [out :: <DOMAIN>] Using delayed_job (3.0.1)
** [out :: <DOMAIN>] Using delayed_job_active_record (0.3.2)
...
** [out :: <DOMAIN>] Your bundle is complete! It was installed into /srv/www/<APP_NAME>/shared/bundle
...
[<DOMAIN>] executing command
[<DOMAIN>] rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell 'ruby-1.9.3-p125' -c 'cd /srv/www/<APP_NAME>/current; RAILS_ENV=production script/delayed_job stop'
*** [err :: <DOMAIN>] /usr/local/rvm/gems/ruby-1.9.3-p125/gems/delayed_job-3.0.1/lib/delayed/command.rb:4:in `rescue in <top (required)>'
*** [err :: <DOMAIN>] :
*** [err :: <DOMAIN>] You need to add gem 'daemons' to your Gemfile if you wish to use it.
*** [err :: <DOMAIN>] (
*** [err :: <DOMAIN>] RuntimeError
*** [err :: <DOMAIN>] )
*** [err :: <DOMAIN>] from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/delayed_job-3.0.1/lib/delayed/command.rb:1:in `<top (required)>'
*** [err :: <DOMAIN>] from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
*** [err :: <DOMAIN>] from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `block in require'
*** [err :: <DOMAIN>] from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:236:in `load_dependency'
*** [err :: <DOMAIN>] from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
*** [err :: <DOMAIN>] from script/delayed_job:4:in `<main>'
command finished in 7512ms
*** [deploy:update_code] rolling back
...
failed: "rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell 'ruby-1.9.3-p125' -c 'cd /srv/www/<APP_NAME>/releases && tar xzf /tmp/20120314140345.tar.gz && rm /tmp/20120314140345.tar.gz'" on <DOMAIN>
即使错误解释是“如果你想使用它,你需要将 gem 'daemons' 添加到你的 Gemfile”,我已经将 daemons
gem 添加到我的 Gemfile
(从上面的输出你甚至可以注意到我是“使用守护进程(1.1.8)”):
...
gem 'delayed_job'
gem 'delayed_job_active_record'
gem 'daemons'
...
那么,问题是什么?我该如何解决?
在我的 deploy.rb
文件中我有:
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
require 'rvm/capistrano'
set :rvm_ruby_string, 'ruby-1.9.3-p125'
set :rvm_type, :user
require 'bundler/capistrano'
...
附言:终端窗口输出:
$ ruby -v
> ruby 1.9.3p125 (2012-02-16 revision 34643) [i686-linux]
$ which ruby
> /usr/local/rvm/rubies/ruby-1.9.3-p125/bin/ruby
最佳答案
使用 bundler 运行脚本/delayed_job:bundle exec script/delayed_job 开始
关于ruby-on-rails - 如果你想在生产模式下使用它,如何解决 "You need to add gem ' 守护进程到你的 Gemfile 的错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9703680/
使用登录后,我想吐出用户名。 但是,当我尝试单击登录按钮时, 它给了我力量。 我看着logcat,但是什么也没显示。 这种编码是在说。 它将根据我在登录屏幕中输入的名称来烘烤用户名。 不会有任何密码。
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎是题外话,因为它缺乏足够的信息来诊断问题。 更详细地描述您的问题或include a min
我是一名优秀的程序员,十分优秀!