Note that there are some explanatory texts on larger screens.

plurals
  1. POIn Terminal: #rails works but #sudo rails does not -RVM Gemset
    primarykey
    data
    text
    <p><code>alec@Locke:~/workspace/rails/nwis$ rails -v Rails 3.0.7 alec@Locke:~/workspace/rails/nwis$ sudo rails -v sudo: rails: command not found</code></p> <p>I need to use sudo because I have a permission denied error when I try to run rails server on my machine.</p> <p>I think it's an issue with RVM and using Gemsets, but I don't know why. I've tried re-running the Gemset setup process using sudo for each command to make sure my root user and my regular user are on the same page, but that gave me the same result.</p> <p>To be clear as to why I am running as sudo; when trying to start a rails server, this is what happens:</p> <pre><code>rails server =&gt; Booting WEBrick =&gt; Rails 3.0.7 application starting in development on http://0.0.0.0:3000 =&gt; Call with -d to detach =&gt; Ctrl-C to shutdown server Exiting /home/alec/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.2/lib/rack/server.rb:267:in `initialize': Permission denied - /home/alec/workspace/rails/nwis/tmp/pids/server.pid (Errno::EACCES) from /home/alec/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.2/lib/rack/server.rb:267:in `open' from /home/alec/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.2/lib/rack/server.rb:267:in `write_pid' from /home/alec/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.2/lib/rack/server.rb:203:in `start' from /home/alec/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/commands/server.rb:65:in `start' from /home/alec/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/commands.rb:30:in `block in &lt;top (required)&gt;' from /home/alec/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/commands.rb:27:in `tap' from /home/alec/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.7/lib/rails/commands.rb:27:in `&lt;top (required)&gt;' from script/rails:6:in `require' from script/rails:6:in `&lt;main&gt;'` </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload