我想安裝一個新的導軌應用程序。我的機器上已經有了幾個Rails應用程序,一切正常。試圖執行任何命令啓動「導軌」產量「找不到Gemfile」
$ rails new app
Could not locate Gemfile
然後,我想我會運行跟蹤來找出發生了什麼事情,因爲你不會期望有一個Gemfile
在這一點上,無論如何,因爲通常上面的命令將創建一個全新的軌道應用程序在名爲app
的目錄中,該目錄中包含Gemfile
。
$ rails new app --trace
Could not locate Gemfile
所以,我想通過這個詳細的指南,重新安裝在我的電腦上的所有內容:
http://railsapps.github.com/installing-rails.html#gems
後第一個20個左右的步驟,我得到了這個命令:
$ rake -v
Could not locate Gemfile
我假設我的設置在某個地方有些東西沒有關閉,但我什麼都看不到。
這裏是我的RVM設置:
$ rvm version
rvm 1.18.10 (latest) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]
$ rvm list
rvm rubies
jruby-1.6.7 [ x86_64 ]
ruby-1.9.1-p431 [ i386 ]
ruby-1.9.3-p194 [ x86_64 ]
ruby-1.9.3-p286 [ x86_64 ]
ruby-1.9.3-p327 [ x86_64 ]
=* ruby-1.9.3-p385 [ x86_64 ]
# => - current
# =* - current && default
# * - default
$ rvm gemset list
gemsets for ruby-1.9.3-p385 (found in /Users/paul/.rvm/gems/ruby-1.9.3-p385)
(default)
global
=> rails32
這裏我rails32寶石安裝在寶石
$ gem list
*** LOCAL GEMS ***
actionmailer (3.2.12, 3.2.11)
actionpack (3.2.12, 3.2.11)
activemodel (3.2.12, 3.2.11)
activerecord (3.2.12, 3.2.11)
activeresource (3.2.12, 3.2.11)
activesupport (3.2.12, 3.2.11)
arel (3.0.2)
builder (3.0.4)
bundler (1.2.4)
erubis (2.7.0)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
json (1.7.7)
mail (2.4.4)
mime-types (1.21)
multi_json (1.6.1)
polyglot (0.3.3)
rack (1.4.5)
rack-cache (1.2)
rack-ssl (1.3.3)
rack-test (0.6.2)
rails (3.2.12, 3.2.11)
railties (3.2.12, 3.2.11)
rake (10.0.3)
rdoc (3.12.1)
rubygems-bundler (1.1.0)
rvm (1.11.3.6)
sprockets (2.2.2)
thor (0.17.0)
tilt (1.3.3)
treetop (1.4.12)
tzinfo (0.3.35)
捆紮機版本
$ bundle --version
Bundler version 1.2.4
.gemrc文件
$ cat ~/.gemrc
---
:backtrace: false
:benchmark: false
:bulk_threshold: 1000
:sources:
- http://rubygems.org/
- https://rubygems.org
:update_sources: true
:verbose: true
一切似乎都很好,很沮喪,請幫忙。
您是否像'rails -v'或'rails -h'一樣得到相同的錯誤? – Cluster 2013-02-24 02:48:54
@Cluster不幸的是,我得到了同樣的結果。有任何想法嗎? – 2013-02-24 05:32:53
如果你在這些命令之前加上'bundle exec',那麼怎麼辦? – Cluster 2013-02-24 05:37:24