无法启动服务器

时间:2015-12-16 15:13:18

标签: ruby-on-rails ruby heroku

来自heroku的克隆项目,并使用bundle安装所有gem。 这就是我的服务器对我说的。

$ rails s
=> Booting Puma
=> Rails 4.2.2 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/uri/common.rb:176:in `split': bad URI(is not URI?):  (URI::InvalidURIError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/uri/common.rb:211:in `parse'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/uri/common.rb:747:in `parse'
from /Library/Ruby/Gems/2.0.0/gems/pusher-0.15.1/lib/pusher/client.rb:53:in `url='
from /Users/abdullahatkaev/the247clinic/config/initializers/pusher.rb:1:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:268:in `load'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:268:in `block in load'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:268:in `load'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/engine.rb:652:in `block in load_config_initializer'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.2/lib/active_support/notifications.rb:166:in `instrument'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/engine.rb:651:in `load_config_initializer'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/engine.rb:615:in `each'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/engine.rb:615:in `block in <class:Engine>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/initializable.rb:30:in `instance_exec'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/initializable.rb:30:in `run'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:209:in `block in each_strongly_connected_component_from'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/initializable.rb:44:in `each'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/initializable.rb:44:in `tsort_each_child'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:203:in `each_strongly_connected_component_from'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/initializable.rb:54:in `run_initializers'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/application.rb:352:in `initialize!'
from /Users/abdullahatkaev/the247clinic/config/environment.rb:5:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `require'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `block in require'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `require'
from /Users/abdullahatkaev/the247clinic/config.ru:3:in `block in <main>'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from /Users/abdullahatkaev/the247clinic/config.ru:in `new'
from /Users/abdullahatkaev/the247clinic/config.ru:in `<main>'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/server.rb:61:in `app'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/server.rb:139:in `log_to_stdout'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/server.rb:78:in `start'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/abdullahatkaev/the247clinic/bin/rails:8:in `require'
from /Users/abdullahatkaev/the247clinic/bin/rails:8:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `load'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `call'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/abdullahatkaev/the247clinic/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'

有谁知道如何修复它? 也许我应该做更多的事情然后只捆绑。我刚刚开始,对不起,如果它很容易。

1 个答案:

答案 0 :(得分:0)

您缺少配置变量,并且推送器初始化程序无法读取网址,因为它缺少网址。你从回溯中看到这一行:

from /Users/abdullahatkaev/the247clinic/config/initializers/pusher.rb:1:in `<top (required)>'

检查此文件以确切了解您的需求。这取决于您的项目如何设置网址。通过铁轨或像dotenv这样的东西。