Question

I've been trying to run rails s on one of my project. I'm a complete beginner on RoR and was just trying to get things started by first trying to run the files and see how the website looks like. However, it seems like I'm stuck at this one problem that I can't really find a solution to. Can anyone help me?

Here is the error:

/home/peh/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/uri/common.rb:176:in `split': bad URI(is not URI?):  (URI::InvalidURIError)
from /home/peh/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/uri/common.rb:211:in `parse'
from /home/peh/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/uri/common.rb:747:in `parse'
from /home/peh/Desktop/kairos-singapore-master/config/initializers/redis.rb:1:in `<top (required)>'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `block in load'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.0/lib/rails/engine.rb:609:in `block (2 levels) in <class:Engine>'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.0/lib/rails/engine.rb:608:in `each'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.0/lib/rails/engine.rb:608:in `block in <class:Engine>'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/peh/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /home/peh/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /home/peh/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'
from /home/peh/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /home/peh/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:209:in `block in each_strongly_connected_component_from'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.0/lib/rails/initializable.rb:44:in `each'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.0/lib/rails/initializable.rb:44:in `tsort_each_child'
from /home/peh/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:203:in `each_strongly_connected_component_from'
from /home/peh/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /home/peh/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /home/peh/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /home/peh/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/peh/Desktop/kairos-singapore-master/config/environment.rb:5:in `<top (required)>'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /home/peh/Desktop/kairos-singapore-master/config.ru:3:in `block in <main>'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /home/peh/Desktop/kairos-singapore-master/config.ru:in `new'
from /home/peh/Desktop/kairos-singapore-master/config.ru:in `<main>'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.0/lib/rails/commands/server.rb:48:in `app'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.0/lib/rails/commands/server.rb:75:in `start'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.0/lib/rails/commands.rb:78:in `block in <top (required)>'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /home/peh/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Was it helpful?

Solution

You have a bad URI on /home/peh/Desktop/kairos-singapore-master/config/initializers/redis.rb:1. Ruby can't parse it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top