簡體   English   中英

Ruby on Rails服務器啟動錯誤

[英]Ruby on Rails server initiation error

第一次使用rails。 我已經安裝了一切。 我試圖使一個應用程序正常工作並運行服務器,但是它一直失敗。 這就是我得到的。 如果有人可以幫助您。 我在Windows 10操作系統上。

C:\\>cd C:\test_app

C:\test_app>rails s <br>
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw32/lib/nokogiri
.rb:29:in `require': cannot load such file -- nokogiri/nokogiri (LoadError)
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw32
/lib/nokogiri.rb:29:in `rescue in <top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw32
/lib/nokogiri.rb:25:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/loofah-2.0.3/lib/loofah.rb:3
:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/loofah-2.0.3/lib/loofah.rb:3
:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rails-html-sanitizer-1.0.2/l
ib/rails-html-sanitizer.rb:2:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rails-html-sanitizer-1.0.2/l
ib/rails-html-sanitizer.rb:2:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_
view/helpers/sanitize_helper.rb:3:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_
view/helpers/sanitize_helper.rb:3:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_
view/helpers/text_helper.rb:32:in `<module:TextHelper>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_
view/helpers/text_helper.rb:29:in `<module:Helpers>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_
view/helpers/text_helper.rb:6:in `<module:ActionView>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_
view/helpers/text_helper.rb:4:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_
view/helpers/form_tag_helper.rb:18:in `<module:FormTagHelper>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_
view/helpers/form_tag_helper.rb:14:in `<module:Helpers>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_
view/helpers/form_tag_helper.rb:8:in `<module:ActionView>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_
view/helpers/form_tag_helper.rb:6:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_
view/helpers/form_helper.rb:4:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_
view/helpers/form_helper.rb:4:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_
view/helpers.rb:50:in `<module:Helpers>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_
view/helpers.rb:4:in `<module:ActionView>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_
view/helpers.rb:3:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sp
rockets/rails/legacy_asset_tag_helper.rb:7:in `<module:LegacyAssetTagHelper>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sp
rockets/rails/legacy_asset_tag_helper.rb:6:in `<module:Rails>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sp
rockets/rails/legacy_asset_tag_helper.rb:4:in `<module:Sprockets>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sp
rockets/rails/legacy_asset_tag_helper.rb:3:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sp
rockets/rails/helper.rb:45:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sp
rockets/rails/helper.rb:45:in `<module:Helper>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sp
rockets/rails/helper.rb:7:in `<module:Rails>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sp
rockets/rails/helper.rb:6:in `<module:Sprockets>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sp
rockets/rails/helper.rb:5:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sp
rockets/railtie.rb:6:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sp
rockets/railtie.rb:6:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/ra
ils/railtie.rb:3:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/ra
ils/railtie.rb:3:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/ra
ils.rb:11:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/ra
ils.rb:11:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass-ra
ils.rb:1:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass-ra
ils.rb:1:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/r
untime.rb:76:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/r
untime.rb:76:in `block (2 levels) in require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/r
untime.rb:72:in `each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/r
untime.rb:72:in `block in require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/r
untime.rb:61:in `each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/r
untime.rb:61:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler.r
b:134:in `require'
        from C:/test_app/config/application.rb:7:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/com
mands/commands_tasks.rb:78:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/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.4/lib/rails/com
mands/commands_tasks.rb:75:in `tap'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/com
mands/commands_tasks.rb:75:in `server'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/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.4/lib/rails/com
mands.rb:17:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

首先,您是否編寫了bundle install

其次,您確定擁有“寶石”嗎?

我認為,您應該安裝ubuntu(使用起來非常簡單,請參見: https//www.codecademy.com/命令行教程)並在上面進行編碼。 要安裝ubuntu,您可以下載諸如virtualbox(免費)之類的東西來創建虛擬機。

為什么我告訴你這個? 因為Windows上的代碼真的很難。 您會遇到很多問題。

我已經嘗試安裝新項目,但是我的rails自動執行bundle install ,抱歉:

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM