Closed abaird closed 9 years ago
Hello, I'm sorry you're having so much problem installing Prax, but thanks for the very detailed report!
It's advised to run the prax install
command, and I should remove the manual install from README to point to the actual script. We need sudo to install the libnss extension into /lib
, to install the prax sysvinit script into /etc/init.d
, to run update-rc.d
to enable the sysvinit script (that messes with iptables) and symlink to /usr/local/bin
. This should be handled by libexec/prax-install when required, so you don't need to run sudo prax install
.
Of course, you shouldn't have a permission error when dealing with the SSL keys. There must be a problem in the script.
I'm noticing a Prax::NoSuchApp
error, which means that Prax is unable to find an application, which is expected, because it failed to link the application (because ~/.prax
is certainly root:root):
$ prax link
ln -s '/home/abaird/workspace/market_place_api' '/home/abaird/.prax/market_place_api'
ln: failed to create symbolic link ‘/home/abaird/.prax/market_place_api’: Permission denied
I'd advise to uninstall with root permissions: sudo prax uninstall
and removing ~/.prax
, then reinstall with bin/prax install
after tweaking libexec/prax-install
to not generate the SSL key, so the script will proceed correctly (you can generate them later if you need SSL). You are also encouraged to configure Prax so it knows about RVM: https://github.com/ysbaddaden/prax/wiki/Ruby-Version-Managers
I am getting a very similar error in Ubuntu 14.04
$ cd /opt/prax/ && ./bin/prax install
Installing NSSwitch extension (to resolve .dev domains)
make: `libnss_prax.so.2' is up to date.
ln -sf /opt/prax/ext/libnss_prax.so.2 /lib
Adding "prax" to the hosts line of /etc/nsswitch.conf
Installing Prax firewall rule
update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match prax Default-Stop values (1)
System start/stop links for /etc/init.d/prax already exist.
Creating ~/.prax directory
Symlinking prax into /usr/local/bin
Generating SSL key and certificate
server.key: Permission denied
139981235656352:error:0200100D:system library:fopen:Permission denied:bss_file.c:398:fopen('server.key','w')
139981235656352:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:
Error opening Private Key server.key
140120227698336:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('server.key','r')
140120227698336:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:
unable to load Private Key
server.csr: No such file or directory
You clearly don't have permissions to write into the ssl/
directory. That should be fixed in 0b49eca61f064166103edd3d5899f8769432d9d0 (current master).
Summary: Installing prax without sudo gives
server.key: Permission denied
error. Installing prax with sudo doesn't result in a clean install and fails to render the rails start page when I navigate to my app athttp://market_place_api.dev
.I'm trying to install prax on my newly upgraded Mint 17 system. When I follow the directions on the README (not using
sudo prax install
) I get the following stack (it does ask me for my password when installing):I tried troubleshooting this by running
chmod 777
on the most likely server.key but I still get the same error installing. Here is some more output that may be useful:If I change to running
sudo prax install
then, despite seeming to get a somewhat clean install, when I goto my app in my browser I don't see the app. Here is the log of my attempt:When I run
rails s
from my directory I can see localhost:3000 just fine:So, I'm wondering what is the right way to install? It seems like I shouldn't really need sudo to install, but I can't figure out how to get around the server.key permissions issue. Here's some information about my environment: Running on Mint 17, Ruby 2.1.3 installed via RVM, Rails 4.1.6.