ysbaddaden / prax

Rack proxy server for development
http://ysbaddaden.github.io/prax/
Other
475 stars 49 forks source link

Prax is broken with ZSH #128

Closed Maidomax closed 9 years ago

Maidomax commented 9 years ago

I'm trying to get prax to work on Elementary OS Freya, but it doesn't. I follow the guide, i link to a rails app called railstest, and when I go to railstest.dev, after some time I see

Can't start application "railstest"

Please look at /home/mladen/.prax/_logs/railstest.log for details

when I open railstest.log, I see

bundle exec ruby /usr/local/lib/prax/bin/../lib/racker/command.rb --server /home/mladen/.prax/_sockets/railstest.sock

when I copy and past that to the terminal, and run it, then the app becomes available on railstest.dev.

Not sure why this is so. I have zshell as my default shell, not bash. Maybe it has something to do with that.

ysbaddaden commented 9 years ago

Most probably, yes. Prax runs bash and your Ruby Version Manager must configure ~/.praxconfig accordingly as per the documentation so the proper Ruby and Bundler can be found.

Is there anything more in the log that could explain why your application won't be started by Prax?

Maidomax commented 9 years ago

No, just the command in one line. I'll check the docs you are talking about.

Maidomax commented 9 years ago

Convigured RVM as docs instruct. Now when I run prax start, I get:

RVM project not found at: /home/mladen/Projects/railstest
Starting prax in the background.

I don't know what that means. I have a new rails installation there.

ysbaddaden commented 9 years ago

Does the application start, now?

Instead of creating ~/.praxconfig you'll may want to create .praxrc into /home/mladen/Projects/railstest (and other rails projects) — cf. https://rvm.io/integration/pow

Maidomax commented 9 years ago

Sorry for the slohohow response, got distracted with other projects, never got to try your advice.

I created .praxrc and pasted the code from the rvm link you sent into it, and it still doesn't work. I start prax, and I get:

➜  railstest  prax start
RVM project not found at: /home/mladen/Projects/railstest
Starting prax in the background.

The url railstest.dev gives me:

Can't start application "railstest"

Please look at /home/mladen/.prax/_logs/railstest.log for details

The log file above has:

RVM project not found at: /home/mladen/Projects/railstest
RVM project not found at: /home/mladen/Projects/railstest
bundle exec ruby /usr/local/lib/prax/bin/../lib/racker/command.rb --server /home/mladen/.prax/_sockets/railstest.sock
ysbaddaden commented 9 years ago

It appears that Prax is broken with RVM. See #129