I want to run Rails application on EC2 machine. When my SSH session terminates the rails server shutdown. I want to run the rails server in the background. I used rails s -d command to run rails daemon mode.
But it seems like Puma is not started. This is the message I receive and after that process terminates.
Booting Puma
=> Rails 5.0.6 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Usually when I run rails server I get
=> Booting Puma
=> Rails 5.0.6 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.11.0 (ruby 2.3.5-p376), codename: Love Song
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:3000
Use Ctrl-C to stop
What is going wrong? Is puma server booting up but not starting?
Related
im working on linux, on a project with ruby on rails.
I have a probléme when i use rails s.
Normaly when i do rails s i can see that :
Booting Puma
=> Rails 6.0.0 application starting in development
=> Run `rails server --help` for more startup options
Puma starting in single mode...
* Version 4.3.5 (ruby 2.6.3-p62), codename: Mysterious Traveller
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://127.0.0.1:3000
* Listening on tcp://[::1]:3000
and i can see my project on localhost 3000
But now, on my current project, its juste do :
=> Booting Puma
=> Rails 6.0.0 application starting in development
=> Run `rails server --help` for more startup options
Nothing more, no error message and i just cant acces to my project on localhost3000.
I tryed to specify a port with rails s -p 3000 or a PID with rails -P ... but its didnt changed nothing
i tryed rake rails:update:bin but it didnt changed anything also
Do you have any idea of what i could do for solve my problem and work agan localy on my projet?
Thank's
I guess your errors (std::err) are hidden from console.
You must be having this error
=> A server is already running. Check /YourProjectPath/tmp/pids/server.pid.
go to tmp/pids/server.pid, You will find a server ID there. Run the following command on your terminal with your server ID.
i.e:
$ kill 13455
//where 13455 is server ID for my project.
if it doest not work. Restart your PC.
You can use webrick server instead of puma server using rails s webrick
My web application runs in Windows with Xampp server. Now in development mode. I want to try production mode.
I stopped server and restarted again.
I issued command
$> rails s -e production (for starting)
I get error " We're sorry, but something went wrong.
If you are the application owner check the logs for more information." in browser screen.
In my database.yml, I do have both development and production databases available (mysql).
Please let me know how to proceed here. Thanks.
My Git bash output:
=> Booting Puma
=> Rails 5.2.3 application starting in production
=> Run `rails server -h` for more startup options
*** SIGUSR2 not implemented, signal based restart unavailable!
*** SIGUSR1 not implemented, signal based restart unavailable!
*** SIGHUP not implemented, signal based logs reopening unavailable!
Puma starting in single mode...
* Version 3.12.1 (ruby 2.5.5-p157), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: production
* Listening on tcp://0.0.0.0:3000
Use Ctrl-C to stop
Observation: Listening on tcp://0.0.0.0:3000 (But the error described pops up in browser) when I point to localhost:3000
We're sorry, but something went wrong.
If you are the application owner check the logs for more information.
I am working on a project which is an updated version of a new project. Using vagrant to load virtual environment and when i run
RAILS_ENV=development bundle exec rails s
The following is returned:
=> Booting Puma
=> Rails 5.0.0.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.6.0 (ruby 2.3.3-p222), codename: Sleepy Sunday Serenity
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
Use Ctrl-C to stop
When i visit the browser I have tried localhost:3000 and 127.0.0.1:3000 but keep getting:
ERR_CONNECTION_REFUSED
On the previous version of this project on a different repository loaded it was accessible via these URL's. This project has been updated to Rails 5 but dont know why it is listening on TCP rather than HTTP. Any suggestions?
As it has been already suggested, make sure that the server is bounden to 0.0.0.0 so that all interfaces can access it.
You might try:
RAILS_ENV=development bundle exec rails s -b 0.0.0.0
I am going through the rails tutorial. I am on chapter 1, section 1.3.2.
https://www.railstutorial.org/book/beginning#sec-the_hello_application
After I ran the command
rails server -b $IP -p $PORT
I see the following:
=> Booting Puma
=> Rails 5.0.0.1 application starting in development on http://0.0.0.0:8080
=> Run rails server -h for more startup options
Puma starting in single mode...
Version 3.4.0 (ruby 2.3.0-p0), codename: Owl Bowl Brawl
Min threads: 5, max threads: 5
Environment: development
Listening on tcp://0.0.0.0:8080
Use Ctrl-C to stop
The terminal says it is running on http://0.0.0.0:8080, but when I visit this URL I get the follow error:
ERR_ADDRESS_INVALID
I am completely new to Rails. What can I do to solve this?
Do not try to access the project through the IP address and port number rails returns to you--it won't work!
Try rails server -b $IP -p $PORT
For further clarification check this link
The app will be running on http://[your_workspacename]-[your_username].c9users.io
I am deploying a Rails application into production using Thin. Right after starting rails, Thin shuts down, the only ouput is 'Exiting':
$ bundle exec rails s -e production
=> Booting Thin
=> Rails 4.0.0 application starting in production on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
Exiting
The same configuration / setup works in development. The same configuration works for production using WEBrick:
$ bundle exec rails s -e production
=> Booting WEBrick
=> Rails 4.0.0 application starting in production on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2013-07-19 17:59:07] INFO WEBrick 1.3.1
[2013-07-19 17:59:07] INFO ruby 2.0.0 (2013-06-27) [x86_64-linux]
[2013-07-19 17:59:07] INFO WEBrick::HTTPServer#start: pid=5231 port=3000
Surely it should be possible to receive some output on why it is shutting down from a web server rated for production use. However, I have not found out how.
Any ideas?
Turns out starting Thin in production mode made Rails eager load a module also using EventMachine, thus keeping the Thin code from being blocked after starting and immediately shutting down instead.