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
/home/mlzboy/.rvm/gems/ruby-1.9.2-p0/bin/rails
mlzboy@mlzboy-MacBook ~/my/b2c2 $ sudo /home/mlzboy/.rvm/gems/ruby-1.9.2-p0/bin/rails s -p80