简体   繁体   English

Rails服务器无法启动

[英]Rails server does not start

I have installed Ruby 2.2.2-x64 with DevKit DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe on Windows 8.1. 我已经在Windows 8.1.上安装了带有DevKit DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe Ruby 2.2.2-x64 DevKit DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe Windows 8.1.

I updated the gem, installed therubyracer , node.js , therubyrhino , sqllite3 , an my gem file have this line added: 我更新了gem,安装了therubyracernode.jstherubyrhinosqllite3 ,在我的gem文件中添加了以下这一行:

gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]

My local gems are: 我的本地宝石是:

C:\Users\ogautier>gem list

*** LOCAL GEMS ***

actionmailer (4.2.1)
actionpack (4.2.1)
actionview (4.2.1)
activejob (4.2.1)
activemodel (4.2.1)
activerecord (4.2.1)
activesupport (4.2.1)
arel (6.0.0)
bigdecimal (1.2.7, 1.2.6)
binding_of_caller (0.7.2)
builder (3.2.2)
bundler (1.9.8, 1.9.7)
byebug (4.0.5)
coffee-rails (4.1.0)
coffee-script (2.4.1)
coffee-script-source (1.9.1.1)
columnize (0.9.0)
debug_inspector (0.0.2)
erubis (2.7.0)
execjs (2.5.2)
globalid (0.3.5)
i18n (0.7.0)
io-console (0.4.3)
jbuilder (2.2.13)
jquery-rails (4.0.3)
json (1.8.2, 1.8.1)
loofah (2.0.2)
mail (2.6.3)
mime-types (2.5)
mini_portile (0.6.2)
minitest (5.6.1, 5.4.3)
multi_json (1.11.0)
nokogiri (1.6.6.2 x64-mingw32)
power_assert (0.2.3, 0.2.2)
psych (2.0.13, 2.0.8)
rack (1.6.1)
rack-test (0.6.3)
rails (4.2.1)
rails-deprecated_sanitizer (1.0.3)
rails-dom-testing (1.0.6)
rails-html-sanitizer (1.0.2)
railties (4.2.1)
rake (10.4.2)
rdoc (4.2.0)
rubygems-update (2.4.6)
sass (3.4.13)
sass-rails (5.0.3)
sdoc (0.4.1)
sprockets (3.1.0)
sprockets-rails (2.3.1)
sqlite3 (1.3.10 x64-mingw32)
test-unit (3.0.9, 3.0.8)
therubyrhino (2.0.4)
therubyrhino_jar (1.7.6)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.1, 1.4.1)
turbolinks (2.5.3)
tzinfo (1.2.2)
tzinfo-data (1.2015.4)
uglifier (2.7.1)
web-console (2.1.2)

But the server does not start with rails server command, the error is listed below: 但是服务器不以rails server命令启动,错误如下所示:

C:\Users\ogautier\RoR\holamundo>rails server
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x64-mingw32/lib/sqlite3.rb
:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x64-mingw32/l
ib/sqlite3.rb:6:in `rescue in <top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x64-mingw32/l
ib/sqlite3.rb:2:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.7/lib/bundler/ru
ntime.rb:76:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.7/lib/bundler/ru
ntime.rb:76:in `block (2 levels) in require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.7/lib/bundler/ru
ntime.rb:72:in `each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.7/lib/bundler/ru
ntime.rb:72:in `block in require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.7/lib/bundler/ru
ntime.rb:61:in `each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.7/lib/bundler/ru
ntime.rb:61:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.7/lib/bundler.rb
:134:in `require'
        from C:/Users/ogautier/RoR/holamundo/config/application.rb:7:in `<top (r
equired)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/com
mands/commands_tasks.rb:78:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/com
mands/commands_tasks.rb:78:in `block in server'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/com
mands/commands_tasks.rb:75:in `tap'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/com
mands/commands_tasks.rb:75:in `server'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/com
mands/commands_tasks.rb:39:in `run_command!'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/com
mands.rb:17:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

Is there someone that help me please? 请问有人帮我吗?

Thanks!! 谢谢!!

From what I've gathered this seems to be a windows specific issue with SQLite3. 从我收集的数据来看,这似乎是SQLite3的Windows特定问题。 I would suggest taking a look at cannot load such file -- sqlite3/sqlite3_native (LoadError) on ruby on rails as there seems to be some workarounds there to get by this issue. 我建议您看一下无法加载此类文件-sqlite3 / sqlite3_native(LoadError)在Rails上的ruby上 ,因为似乎有一些变通办法可以解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM