> > i dont know why but "script/server -p 80" gives error me now as > > amrit@ubuntu:~/amritdemo$ script/server -p 80 > => Booting WEBrick > => Rails 2.3.5 application starting on http://0.0.0.0:80 > => Call with -d to detach > => Ctrl-C to shutdown server > [2011-04-22 09:20:01] INFO WEBrick 1.3.1 > [2011-04-22 09:20:01] INFO ruby 1.8.7 (2010-01-10) [i486-linux] > [2011-04-22 09:20:06] WARN TCPServer Error: Permission denied - > bind(2) > Exiting > /usr/lib/ruby/1.8/webrick/utils.rb:73:in `initialize': Permission > denied - bind(2) (Errno::EACCES) > from /usr/lib/ruby/1.8/webrick/utils.rb:73:in `new' > from /usr/lib/ruby/1.8/webrick/utils.rb:73:in `create_listeners' > from /usr/lib/ruby/1.8/webrick/utils.rb:70:in `each' > from /usr/lib/ruby/1.8/webrick/utils.rb:70:in `create_listeners' > from /usr/lib/ruby/1.8/webrick/server.rb:75:in `listen' > from /usr/lib/ruby/1.8/webrick/server.rb:63:in `initialize' > from /usr/lib/ruby/1.8/webrick/httpserver.rb:24:in `initialize' > from /usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/ > webrick.rb:10:in `new' > from /usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/ > webrick.rb:10:in `run' > from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb: > 111 > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in > `gem_original_require' > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in > `require' > from script/server:3 > > > why? > > Linux/un*x systems require root privileges in order for a process to bind to "privileged" ports (any port number lower than 1024 (which is why rails and most other "development" and "testing" -mode processes use higher-numbered ports like 3000).
If you really want to run your rails app on port 80 using the command above, you'll likely need to use "sudo": sudo script/server -p 8 However, if you're using RVM to manage your ruby and rubygems collections then you'd use its sudo wrapper "rvmsudo" that retains your "ruby environment" settings. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.