【发布时间】:2011-12-04 14:14:55
【问题描述】:
我真的是 Ruby 和 Rails 的新手。 我刚刚安装了 RubyMine + Gems 和所有东西。 我正在尝试使用 Tools -> run rails generator 添加新控件 在选择 Controler 并命名(让我们说“你好”)后,我得到以下输出:
D:\Ruby193\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)
D:/Ruby193/NewTest/script/rails generate controller hello -s
D:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/resolver.rb:280:in `resolve': Could not find gem 'sass-rails (~> 3.1.5.rc.2) x86-mingw32' in any of the gem sources listed in your Gemfile. (Bundler::GemNotFound)
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/resolver.rb:160:in `start'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/resolver.rb:128:in `block in resolve'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/resolver.rb:127:in `catch'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/resolver.rb:127:in `resolve'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/definition.rb:151:in `resolve'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/definition.rb:90:in `specs'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/definition.rb:135:in `specs_for'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/definition.rb:124:in `requested_specs'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/environment.rb:23:in `requested_specs'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/runtime.rb:11:in `setup'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler.rb:110:in `setup'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/setup.rb:17:in `<top (required)>'
from D:/Ruby193/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `require'
from D:/Ruby193/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
from D:/Ruby193/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from D:/Ruby193/NewTest/config/boot.rb:6:in `<top (required)>'
from D:/Ruby193/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from D:/Ruby193/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from D:/Ruby193/NewTest/script/rails:5:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
进程以退出代码 1 结束
【问题讨论】:
-
你在 Rubymine 中运行过
bundle install吗? -
你能告诉我怎么做吗(抱歉,Ruby 中的鲜鱼)
-
从内存中... 工具 -> 捆绑包 -> 安装。这将确保您的 Gemfile 中指定的所有 gem 都为 Rubymine 所知。
标签: ruby-on-rails controller rubygems