我正在尝试在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是行不通的


基础教程推荐
- 如何将mysql数据库文件连接到Rails应用程序上的本地ruby 2023-09-21
- R语言入门使用RStudio制作包含Rcpp代码的R包 2022-12-05
- R语言向量下标和子集的使用 2022-12-10
- R语言因子型数值转数值型的操作 2022-11-23
- 解决R语言中install_github中无法安装遇到的问题 2022-11-26
- R语言的一个加法函数使用介绍 2022-11-14
- 详解swift中xcworkspace多项目管理 2023-07-05
- 汇编语言:比较指令、跳转指令、JCC的使用 2023-07-06
- 深入探究Golang中log标准库的使用 2023-07-25
- ruby – 如何使用Nginx,Passenger,Sinatra创建多个位置 2023-09-20