How to run rails s -p80 on 80 port?

By default,

 rails s #running on 3000 port

Now I want to run it on port 80. So I tried:

 sudo rails -s -p80

But it threw an error:

mlzboy@mlzboy-MacBook ~/my/b2c2 $ sudo rails s -p80
sudo: rails: command not found

I used rvm to install ruby & rails. It seems rvm is user specified. Is it not able to find rails in root?

I also tried below code:

mlzboy@mlzboy-MacBook ~/my/b2c2 $ which rails
mlzboy@mlzboy-MacBook ~/my/b2c2 $ sudo /home/mlzboy/.rvm/gems/ruby-1.9.2-p0/bin/rails s -p80


rvmsudo rails server -p 80

Need Your Help

My AJAX Application always returns “found”

php mysql ajax

I want to do a really simple task: check if an inserted id matches one found in a mysql database. If no match, an alert box will appear displaying an invalid id message. The problem that I have i...

How to change recent App thumbnail?

android user-interface broadcastreceiver android-ui

On press of recent app button, it shows recently opened application in thumbnail with its previous state.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.