创建“Rails应用程序”项目后出现RubyMine错误

时间:2011-03-25 19:53:37

标签: ruby-on-rails rubymine

我已经下载并安装了“rubyinstaller-1.9.2-p180.exe”,然后通过运行'gem install rails'安装了gems(运行'ruby setup.rb'的rubygems-1.6.2)和安装的rails ”。 完成所有这些后,我已经下载并安装了RubyMine 3.1

在RubyMine中,我尝试创建新的“Rails应用程序”项目,在上面显示的“Rails应用程序设置”对话框中安装rub作为Ruby解释器,Rails版本说“3.0.5”。 Rails模板为空。未选中“对所选数据库进行预配置”,并且未选中“跳过测试:单元文件”。

单击确定后,它会在代码顶部创建一些文件,有一条消息“一些必需的getms附注:sqlite3”(我没问过DB,为什么sqlite ??)反正我点击,'附上宝石'。

之后我点击播放图标,并获得以下错误。请帮我解决这个问题。提前谢谢!

------------------------------
C:\Ruby192\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:/Users/kobi/RubymineProjects/deded/script/rails server -b 127.0.0.1 -p 3000 -e development
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sqlite3-1.3.3-x86-mingw32/lib/sqlite3.rb:6:in `require': no such file to load -- sqlite3/sqlite3_native (LoadError)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sqlite3-1.3.3-x86-mingw32/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sqlite3-1.3.3-x86-mingw32/lib/sqlite3.rb:2:in `<top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in `block in require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler.rb:120:in `require'
from C:/Users/kobi/RubymineProjects/deded/config/application.rb:7:in `<top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/commands.rb:28:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/commands.rb:28:in `block in <top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/commands.rb:27:in `tap'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/commands.rb:27:in `<top (required)>'
from C:/Users/kobi/RubymineProjects/deded/script/rails:6:in `require'
from C:/Users/kobi/RubymineProjects/deded/script/rails:6:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'

Process finished with exit code 1

2 个答案:

答案 0 :(得分:0)

从控制台尝试:

cd C:/users/kobi/rubymineprojects/deded
bundle install

答案 1 :(得分:0)

RubyInstaller for Ruby 1.9.2不支持任何其他RubyGems版本,除了RubyInstaller附带的版本。通过更新RubyGems,您可以破坏Ruby安装。请将Ruby重新安装到clean目录中,不要更新RubyGems。

此外,您的PATH环境中似乎缺少sqlite3.dll。 Download将其解压缩到RUBY_HOME \ bin或c:\ windows \ system32。 Rails需要一些数据库,sqlite是默认的。

如果您在安装此类宝石时遇到问题,可能需要安装DevKit,install DevKit