RubyMine - 添加控制器
我对 Ruby 和 Rails 还很陌生。 我刚刚安装了 RubyMine + Gems 和所有东西。 我正在尝试使用“工具”->“添加新的控件”运行轨道发电机 选择控制器并给出名称(让我们说“你好”)后,我得到以下输出:
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
I'm really new with Ruby and Rails.
I've just installed RubyMine + the Gems and everything.
I'm trying to add new Control by using Tools -> run rails generator
after select Controler and give a name (lets say "hello") i'm getting the following output:
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>'
Process finished with exit code 1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须首先通过选择“工具”-“Bundler”-“安装”来运行 Bundler,然后单击“安装”按钮(对 Rubymine 5.4 有效)。
然后 Bundler 下载并安装 Gemfile 中列出的所有 gem,
之后您应该能够使用菜单生成控制器。
如果您愿意,也可以手动运行(从控制台),
Rubymine 将拾取更改。如果没有,您可以右键单击项目并选择同步。
You must run Bundler first by selecting Tools - Bundler - Install and then click Install button (valid for Rubymine 5.4).
Bundler then downloads and installs all gems listed in Gemfile
After that you should be able to generate your controller using the menu.
If you prefer you could also run manually (from console)
Rubymine will pickup the changes. If not you can right-click on project and select Synchronize.