這是一個非常奇怪的,我不知道如何繼續。Rails應用程序不能檢測本地寶石
基本上,我能夠安裝寶石,並通常在除了用rails創建的文件夾之外的任何文件夾中使用它們。這非常奇怪。這很難解釋,所以也許這個控制檯輸出可以解釋
[email protected]:~/railsapps$ ls
app test_application testing
[email protected]:~/railsapps$ rails -v
Rails 3.2.2
[email protected]:~/railsapps$
[email protected]:~/railsapps$
[email protected]:~/railsapps$ cd app/
[email protected]:~/railsapps/app$ ls -a
. app config.ru doc Gemfile.lock lib public README.rdoc test vendor
.. config db Gemfile .gitignore log Rakefile script tmp
[email protected]:~/railsapps/app$
[email protected]:~/railsapps/app$
[email protected]:~/railsapps/app$ rails -v
The program 'rails' is currently not installed. To run 'rails' please ask your administrator to install the package 'rails'
[email protected]:~/railsapps/app$
它使雞毛蒜皮的所有感覺。當我的rails文件夾外,我可以調用rails來創建一個新的應用程序,但是一旦進入,rails就不會被檢測到。這對包括捆綁軟件在內的所有寶石都是一樣的。
我的第一個想法是,不知何故,rails有一些特定的gem文件夾隱藏起來,所以我從rails項目中完成了我的gem install,但是這也不起作用。
有什麼想法?
我的設置是Ubuntu服務器10.10(我知道,我知道) 紅寶石1.9.2 寶石1.8.17 和我使用從wayneeseguin最新RVM。 enter code here
您的應用程序中是否有.rvmrc文件夾? – 2012-03-11 21:58:59
@FrederickCheung沒有。我已經將輸出更改爲ls-a,所以你可以看到完整的目錄 – OVERTONE 2012-03-11 22:02:40
啊,我不知道你必須指定在rails文件夾中使用哪個rvm gemset'rvm use ruby-1.9.2-pxxxxx' – OVERTONE 2012-03-11 22:07:30