我想安装一个新的导轨应用程序。我的机器上已经有了几个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