迁移后复制gemset

时间:2014-10-09 11:02:13

标签: ruby-on-rails ruby apache rvm

您好我的客户端有一个ruby网站。我对红宝石知之甚少。网站之前工作正常。我将相同的设置迁移到新服务器。迁移后,

rvm was unable to use appname@1.9.3

所以,我检查两台服务器中的gemlists。

旧服务器

root@host [/usr/local/rvm/gems/ruby-1.9.3-p484/wrappers]# rvm gemset list_all

gemsets for ruby-1.9.3-p484 (found in /usr/local/rvm/gems/ruby-1.9.3-p484)
=> (default)
   global
   appname

新服务器

root@host [/usr/local/rvm/gems/ruby-1.9.3-p547]# rvm gemset list_all
Warning! PATH is not properly set up, '/usr/local/rvm/gems/ruby-1.9.3-p547/bin' is not at first place,
         usually this is caused by shell initialization files - check them for 'PATH=...' entries,
         it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
         to fix temporarily in this shell session run: 'rvm use ruby-1.9.3-p547'.

gemsets for ruby-1.9.3-p547 (found in /usr/local/rvm/gems/ruby-1.9.3-p547)
=> (default)
   global

除了路径错误,我注意到,新服务器中缺少一个gemset。如何将其导入新的?

1 个答案:

答案 0 :(得分:0)

在项目的根目录中创建以下文件:

.ruby-宝石: appname

.ruby版本: 1.9.3

然后使用cd PROJECT_ROOT转到您的项目目录,然后运行bundle install

您可以在此处找到有关这些文件的更多信息: http://rvm.io/workflow/projects