我在启动rails服务器时遇到错误

时间:2017-08-19 20:02:39

标签: ruby-on-rails ruby

我一直试图启动我的rails服务器时出现以下错误。任何帮助,将不胜感激!我很擅长ruby并且不确定如何解决这个问题。谢谢!

$ rails s
=> Booting Puma
=> Rails 5.1.3 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Exiting
/usr/local/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/puma/launcher.rb:342:in `stat': No such file or directory @ rb_file_s_stat - /Users/macuser/desktop/SSS (Errno::ENOENT)
from /usr/local/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/puma/launcher.rb:342:in `generate_restart_data'
from /usr/local/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/puma/launcher.rb:64:in `initialize'
from /usr/local/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/rack/handler/puma.rb:65:in `new'
from /usr/local/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/rack/handler/puma.rb:65:in `run'
from /usr/local/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/server.rb:297:in `start'
from /usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.3/lib/rails/commands/server/server_command.rb:44:in `start'
from /usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.3/lib/rails/commands/server/server_command.rb:131:in `block in perform'
from /usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.3/lib/rails/commands/server/server_command.rb:126:in `tap'
from /usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.3/lib/rails/commands/server/server_command.rb:126:in `perform'
from /usr/local/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from /usr/local/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
from /usr/local/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
from /usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.3/lib/rails/command/base.rb:63:in `perform'
from /usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.3/lib/rails/command.rb:44:in `invoke'
from /usr/local/lib/ruby/gems/2.4.0/gems/railties-5.1.3/lib/rails/commands.rb:16:in `<top (required)>'
from /Users/macuser/Desktop/untitled folder/SSS/bin/rails:9:in `require'
from /Users/macuser/Desktop/untitled folder/SSS/bin/rails:9:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
from /usr/local/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
from /usr/local/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
from /usr/local/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
from /usr/local/lib/ruby/gems/2.4.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
from /usr/local/lib/ruby/gems/2.4.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /Users/macuser/Desktop/untitled folder/SSS/bin/spring:15:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'

1 个答案:

答案 0 :(得分:0)

检查Gemfile(或代码),因为您尝试访问不存在的文件/文件夹/Users/macuser/Desktop/untitled folder/SSS

删除或更新,捆绑并重新启动