【发布时间】:2013-05-09 09:36:18
【问题描述】:
我已经在 Linux Mint v14 Nadia 上安装了 rails 4.0.0.rc1。
当我跑步时
rails new something
这给了我错误(我将只放最后几行):
创建供应商/资产/样式表/.keep 运行捆绑安装 /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/ui.rb:36:in
initialize': undefined method[]' for # (NoMethodError) 来自 /usr/lib/ruby/vendor_ruby/bundler/cli.rb:12:innew' from /usr/lib/ruby/vendor_ruby/bundler/cli.rb:12:ininitialize' 来自 /usr/lib/ruby/vendor_ruby/bundler/vendor/thor.rb:263:innew' from /usr/lib/ruby/vendor_ruby/bundler/vendor/thor.rb:263:indispatch' 来自 /usr/lib/ruby/vendor_ruby/bundler/vendor/thor/base.rb:386:instart' from /var/lib/gems/1.9.1/gems/bundler-1.3.5/bin/bundle:20:inblock in ' 来自 /var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/friendly_errors.rb:3:inwith_friendly_errors' from /var/lib/gems/1.9.1/gems/bundler-1.3.5/bin/bundle:20:in'
然后我更改目录以检查依赖关系:
cd something
bundle check
上面写着:
解决依赖关系... Bundler 无法满足您的 Gemfile 的依赖关系。 使用
bundle install安装缺少的 gem。
然后我运行:
捆绑安装
它正在显示:
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Enter your password to install the bundled RubyGems to your system:
Installing rake (10.0.4)
Using i18n (0.6.4)
Using minitest (4.7.4)
Using multi_json (1.7.3)
Using atomic (1.1.9)
Using thread_safe (0.1.0)
Using tzinfo (0.3.37)
Using activesupport (4.0.0.rc1)
Using builder (3.1.4)
...等等,这需要一个多小时并且仍在运行。
我认为这里发生了一些奇怪的事情。 也许我的安装不正确...
【问题讨论】:
-
你运行的是什么版本的 ruby?
-
Ruby 版本为 1.9.3