Hello there,
I’ve a big problem – I come now PC and started rails server and I got
this huge report of errors. The rails server is not running, I’ve any
idea, what is wrong. Yesterday everything worked yet…
The statement after command “rails server” is here:
=> Booting Mongrel
=> Rails 3.0.5 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/tcphack.rb:12:in initialize_without_backlog': Address already in use - bind(2) (Errno::EADDRINUSE) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/tcphack.rb:12:ininitialize’
from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:93:in new' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:93:ininitialize’
from
/Library/Ruby/Gems/1.8/gems/rack-1.2.1/lib/rack/handler/mongrel.rb:10:in new' from /Library/Ruby/Gems/1.8/gems/rack-1.2.1/lib/rack/handler/mongrel.rb:10:inrun’
from /Library/Ruby/Gems/1.8/gems/rack-1.2.1/lib/rack/server.rb:213:in start' from /Library/Ruby/Gems/1.8/gems/railties-3.0.5/lib/rails/commands/server.rb:65:instart’
from
/Library/Ruby/Gems/1.8/gems/railties-3.0.5/lib/rails/commands.rb:30
from
/Library/Ruby/Gems/1.8/gems/railties-3.0.5/lib/rails/commands.rb:27:in tap' from /Library/Ruby/Gems/1.8/gems/railties-3.0.5/lib/rails/commands.rb:27 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:32:ingem_original_require’
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:32:in `require’
from script/rails:6
Can me please someone help, what to do with this problem? I see this
first time and I am confused from it…
The address is already in use. Easiest solution, just restart your PC.
You could have left a process running rails without realizing it. You could try to find and kill the process, but a quick reboot should
solve the problem.
If it doesn’t then you have probably installed something else that’s
conflicting with the port Rails is trying to start on.
`initialize_without_backlog’: Address already in use - bind(2)
(Errno::EADDRINUSE)
This is the error that you’re looking for. It means that another
process (perhaps your rails server from yesterday?) is still listening
on port 3000, so your new server can’t bind to it.
You can either:
find the old server process and terminate it; or
start the new server on a different port (for example: rails server -p
3001).
Also you may have problem with Gem dependencies. You can find all gems
you need here: https://rubygems.org/
check ‘gem list’ to see your gems, and you can use "gem update
to update any gem. For example ‘gem list mongrel’ and ‘gem
update mongrel’ may help you.
On Unix based system definitely use Ruby Version manager. I think on
Win there is smthg similar (tak?).
Good luck,
Zoli
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.