2013-01-02 49 views
2

我有一个在使用RVM时创建的应用程序。我切换到rbenv并无法让它工作。当我尝试运行服务器,它说,它无法找到formastic宝石:从RVM切换到rbenv后,服务器找不到宝石

Could not find formtastic-2.2.1 in any of the sources 
Try running `bundle install`. 

如果我运行bundle install,它说我的包是完整的,但formtastic没有列出。

然而,bundle show formtastic表明,它的安装:

bundle show formtastic 
/Users/me/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/formtastic-2.2.1 

,但服务器无法找到它:

Macintosh-2:$ rails s 
Could not find formtastic-2.2.1 in any of the sources 
Try running `bundle install`. 
+0

最有可能的服务器使用.rvm的红宝石。你如何启动服务器?如果重命名.rvm目录会怎样? –

+0

@DiegoBasch我做了rvm implode删除rvm。我以为这是应该删除rvm。我通常会启动服务器'rails s' – Leahcim

回答

1

除了运行命令rvm implode删除RVM,我也不得不从主目录中删除.rvm目录,因为系统似乎正在寻找宝石:

rm -rf .rvm 

一旦我删除了,我能够启动服务器。