我正在尝试在ubuntu服务器上第一次部署我的应用程序.我一直在遇到这个错误:2013-03-24 15:13:36 executing `deploy:run_migrations* executing rvm gemset use vapinservers: [111.111.111.11][111.111.111.1...

我正在尝试在ubuntu服务器上第一次部署我的应用程序.
我一直在遇到这个错误:
2013-03-24 15:13:36 executing `deploy:run_migrations'
* executing "rvm gemset use vapin"
servers: ["111.111.111.11"]
[111.111.111.11] executing command
** [out :: 111.111.111.11]
** [out :: 111.111.111.11]
** [out :: 111.111.111.11] RVM is not a function, selecting rubies with 'rvm use ...' will not work.
** [out :: 111.111.111.11]
** [out :: 111.111.111.11]
** [out :: 111.111.111.11]
** [out :: 111.111.111.11] You need to change your terminal emulator preferences to allow login shell.
** [out :: 111.111.111.11]
** [out :: 111.111.111.11] Sometimes it is required to use `/bin/bash --login` as the command.
** [out :: 111.111.111.11]
** [out :: 111.111.111.11] Please visit https://rvm.io/integration/gnome-terminal/ for a example.
这是我的一些deploy.rb文件:
require 'bundler/capistrano'
require 'rvm/capistrano'
# set the ruby version
#set :rvm_ruby_string, 'ruby-1.9.3-p392'
#set :rvm_type, :system
# set the rvm gemset to use
set :rvm_gemset, 'vapin'
...
task :install do
run "rvm gemset use #{rvm_gemset}"
run "cd #{current_path} && bundle install --without=test"
end
RVM安装在我的服务器上.
$which rvm
/usr/local/rvm/bin/rvm
$which ruby
/usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby
任何帮助表示赞赏.我一直在谷歌上搜索这个.
编辑
我已经卸载了RVM的多用户安装并重新安装了单用户版本.
我将此行添加到deploy.rb脚本中:
set:default_shell,“/ bin / bash –login”#rvm脚本正常工作所需的#
现在我没有得到“RVM不是一个函数….”错误.
问题是当捆绑安装运行时,我的rvm gemset中没有安装gem.
解决方法:
在我的deploy.rb文件中,设置此行:
set :bundle_dir, "/usr/local/rvm/gems/ruby-1.9.3-p392"
在此之前:
require 'bundler/capistrano'
似乎帮助捆绑者知道在哪里安装宝石.不知道为什么需要这样做.我以前从未需要它.
本文标题为:ruby-on-rails – Capistrano RVM和Ubuntu RVM不是一个功能,用’rvm use …’选择ruby是行不通的


- Ruby 迭代器知识汇总 2023-07-23
- Ruby on Rails在Ping ++ 平台实现支付 2023-07-22
- Golang http.Client设置超时 2023-09-05
- Go Web开发进阶实战(gin框架) 2023-09-06
- 汇编语言程序设计之根据输入改变屏幕颜色的代码 2023-07-06
- R语言-如何切换科学计数法和更换小数点位数 2022-11-23
- R语言绘图数据可视化pie chart饼图 2022-12-10
- R语言关于二项分布知识点总结 2022-11-30
- Ruby的字符串与数组求最大值的相关问题讨论 2023-07-22
- Swift超详细讲解指针 2023-07-08