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

qenim 发布于 2018-11-05 rubymine 最后更新 2018-11-05 10:42 48 浏览

我已经下载并安装了“rubyinstaller-1.9.2-p180.exe”,然后通过运行'gem install rails'来安装gems(运行'ruby setup.rb'的rubygems-1.6.2)和安装的rails。 做完所有这些之后,我已经下载并安装了RubyMine 3.1 在RubyMine中,我尝试创建新的'Rails Application'项目,在'Rails应用程序设置'对话框中,它显示上面安装的Rub是Ruby解释器,Rails Version说'3.0.5'。 Rails模板是空的。 '为所选数据库预配置'未选中,并且“跳过测试:单元文件”未选中。 点击确定后,它会在代码的顶部创建一些文件,“我需要的一些附加信息附加到: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
已邀请:

yet

赞同来自:

从控制台尝试这个:

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

uautem

赞同来自:

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是默认的。 某些原生gem扩展可能需要安装DevKit,如果您在安装此类宝石时遇到问题,请先放置install DevKit