I'm trying to run multiple rails apps (different versions) on my server. I followed this post
Phusion Passenger & running multiple Ruby versions
I ran one app outside the pattern with passenger standalone:
passenger start -a 127.0.0.1 -p 3000 -d
But I got this error:
database configuration does not specify adapter
(ActiveRecord::AdapterNotSpecified)
So, this app is on the development environment and I want to run as production mode.
How can I do it?
Solved! I passed now this command:
passenger start -a 127.0.0.1 -p 3000 -d --environment production
Related
I have installed Redmine on my computer, i can run it with the command:
bundle exec rails server webrick -e production
And that's working good
But it's just for work with localhost.
I need to access to Redmine from another station. For this, i have found this command:
rails s -p 3000 -b 0.0.0.0
And that's working good, but in this case, after some time without query, the rail server turn in sleep.
And if i clic in redmine, the server don't response. I have to enter in console and press a key for wake up it.
That's working with
bundle exec rails server webrick -p3000 -b 0.0.0.0 -e production
Thanks to MAX for telling me that WebRick was a webserver
I have uploaded my Rails app on my Ubuntu server, where I want to keep my Rails server running so that any one can access it at any time.
I tried the command below to run my app:
rails server --binding=oditek.in -p 8888
Please help me to make this possible.
You can try following option to run the server in background.
rails s -d ## With default Port.
rails s -p 8888 -d ## With Custom port.
Or
nohup rails s &
Or
You can also configure your project with Nginx + Passenger
I have changed my Apache2 port from 80 to 3001
now when i start my rails app i use
rvmsudo rails server -p 80
but I want to run my rails app in passenger nginx that I have already installed. i tried the following but not working
1. rvmsudo passenger start -a 127.0.0.1 -p 80 -e development
2. rvmsudo passenger start -p 80
3. sudo passenger start -e development -p 80
So please let me know what the exact thing i have to do to run my app on port 80 using passenger Thnaks in Advance!
You should use Phusion Passenger's Nginx integration mode. The passenger command only gives you access to the Standalone mode. For more information about the differences between the Nginx integration mode and the Standalone mode, see http://www.modrails.com/documentation/Users%20guide.html.
I am using unicorn server for locomotive cms installed on digital ocean in ubuntu 12.04. I am wondering how I keep the server running so when I log out of the ssh session the site stays up and running.
This is currently the command I use to get it running
bundle exec unicorn_rails -p 80
Thanks! in advance
you need to set up unicorn with apache or nginx. here is a guide for apache + unicorn. with that setup you can start and stop server by starting and stopping apache service.
This is a guide on how to setup Unicorn with nginX which I have followed and used numerous times.
https://gist.github.com/billie66/3696537
Run Unicorn via bundler:
bundle exec unicorn -c config/unicorn.rb -E production -D -p 8089
Stop Unicron (if you have followed the guide from above)
kill -9 'cat /path/to/your/app/tmp/pids/unicorn.pid'
I just upgraded to Ruby 1.9.3-p374 on my development machine. Now, when I start Rails with foreman start, it uses port 5000.
Here is my Procfile:
web: bundle exec rails server thin -p $PORT -e $RACK_ENV
My .env:
RACK_ENV=development
PORT=3000
Why is it giving me port 5000, and how can I change it back?
It was using the version installed under my old ruby directory- I hadn't installed it again since upgrading, I'd forgotten it wasn't in my gemfile. Installing it again worked.