【问题标题】:rvm1/capistrano3 doesn't use gemsetrvm1/capistrano3 不使用 gemset
【发布时间】:2014-09-23 03:46:11
【问题描述】:

我正在尝试将 Rails 4 应用程序部署到 VPS。

我的 Capfile、Gemfile、deploy.rb 在this gist

cap production deploy 上,捆绑安装步骤失败,因为它不使用 gemset,并且一直说 gem not found。

cap的相关输出

INFO[90fcd8c1] Running /tmp/domain_spam_checker/rvm-auto.sh 2.1.2 bundle exec gem install --file Gemfile on 162.221.181.224 DEBUG[90fcd8c1] Command: cd /home/deployer/domain_spam_checker/releases/20140922153958 && /tmp/domain_spam_checker/rvm-auto.sh 2.1.2 bundle exec gem install --file Gemfile DEBUG[90fcd8c1] [31mCould not find i18n-0.6.11 in any of the sources[0m DEBUG[90fcd8c1] [33mRun 'bundle install' to install missing gems.[0m cap aborted!

...

Tasks: TOP => deploy => rvm1:install:gems

如何在设置文件的某处提及要使用的 gemset?

如何让 rvm1/cap3 拾取或创建 gemset?

【问题讨论】:

    标签: ruby-on-rails rvm ruby-on-rails-4.1 rvm-capistrano


    【解决方案1】:

    我从未尝试过rvm1/capistrano3,所以无法帮助您,但我建议您改用capistrano/rvm (link)

    Capfile:

    require 'capistrano/rvm'
    

    部署.rb:

    set :rvm_ruby_version, '2.0.0-p247@mygemset'
    

    【讨论】:

    • 我赞成您的回答,因为它帮助我解决了我的问题。但不能接受它,因为它不能解决所提出的问题。会将其留给其他人回答,因此可能对其他人有所帮助。 :-) 非常感谢
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-07
    • 2013-11-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多