N
N
Nikita2015-08-18 14:45:16
Ruby on Rails
Nikita, 2015-08-18 14:45:16

Ruby on Rails server won't start. What is the problem?

Good day!
Faced a problem running rails server on ubuntu, below is the log

rails server
=> Booting WEBrick
=> Rails 4.0.2 application starting in development on 0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/home/niks/SomeProject /firstApp/config/environments/development.rb:1:in `': undefined method `configure' for # (NoMethodError)
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/activesupport- 4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.0.2/lib/active_support/dependencies .rb:229:in `block in require'
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in ` load_dependency'
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /home/niks/.rvm/ gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/engine.rb:591:in `block (2 levels) in '
from /home/niks/.rvm/gems/ruby- 2.0.0-p643/gems/railties-4.0.2/lib/rails/engine.rb:590:in `each'
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties -4.0.2/lib/rails/engine.rb:590:in `block in '
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails /initializable.rb:30:in `instance_exec'
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/initializable.rb:30:in ` run'
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/niks/. rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /home/niks/.rvm/rubies/ruby-2.0.0-p643 /lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /home/niks/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0. 0/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'
from /home/niks/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/tsort.rb:219 :in `each_strongly_connected_component_from'
from /home/niks/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/tsort.rb:209:in `block in each_strongly_connected_component_from'
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `each'
from /home/niks/.rvm/ gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `tsort_each_child'
from /home/niks/.rvm/rubies/ruby-2.0.0-p643 /lib/ruby/2.0.0/tsort.rb:203:in `each_strongly_connected_component_from'
from /home/niks/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/tsort.rb: 182:in `block in each_strongly_connected_component'
from /home/niks/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /home/niks /.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /home/niks/.rvm/rubies/ruby-2.0.0-p643 /lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
from /home/niks/.rvm/ gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
from /home/niks/SomeProject/firstApp/config/environment.rb:5:in `'
from /home/niks/SomeProject/firstApp/config.ru:3:in `require'
from /home/niks/SomeProject/firstApp /config.ru:3:in `block in '
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval'
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize'
from /home/niks/ SomeProject/firstApp/config.ru:in `new'
from /home/niks/SomeProject/firstApp/config.ru:
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.5.5/lib/rack/builder.rb:49:in `eval'
from /home/niks/.rvm/ gems/ruby-2.0.0-p643/gems/rack-1.5.5/lib/rack/builder.rb:49:in `new_from_string'
from /home/niks/.rvm/gems/ruby-2.0.0-p643 /gems/rack-1.5.5/lib/rack/builder.rb:40:in `parse_file'
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.5.5/ lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.5.5/lib/rack/server.rb:199 :in `app'
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/commands/server.rb:48:in `app'
from / home/niks/.rvm/gems/ruby-2.0.0-p643/gems/rack-1.5.5/lib/rack/server.rb:314:in `wrapped_app'
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/commands/server.rb:75:in `start'
from /home/niks/. rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.2/lib/rails/commands.rb:76:in `block in '
from /home/niks/.rvm/gems/ruby-2.0. 0-p643/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
from /home/niks/.rvm/gems/ruby-2.0.0-p643/gems/railties-4.0 .2/lib/rails/commands.rb:71:in `'
from bin/rails:4:in `require'
from bin/rails:4:in `'


[email protected]:~/SomeProject/firstApp$ rails -v
Rails 4.0.2

project gemfile:
source ' https://rubygems.org '
ruby ​​'2.0.0'
#ruby-gemset=railstutorial_rails_4_0
gem 'rails', '4.0.2'
group :development do
gem 'sqlite3', '1.3.8'
end
gem 'sass -rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1 .1'
gem 'jbuilder', '1.0.2'
group :doc do
gem 'sdoc', '0.3.20', require: false
end

Answer the question

In order to leave comments, you need to log in

3 answer(s)
T
TyzhSysAdmin, 2015-08-18
@POS_troi

gem install rails

V
Viktor Vsk, 2015-08-19
@viktorvsk

rbenv rehash
bundle exec rails s
rm -rf ./bin && bundle exec rake rails:update:bin
It's hard to guess from such a limited amount of information.
Direct error leads here
Plus, just google

undefined method `configure' for # (NoMethodError)

A
Alexey, 2017-12-25
@ringo

Look at the development.rb file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question