Deploying Rails App on Elastic Beanstalk - Is WEBrick automatically replaced by passenger? - ruby-on-rails

Quick Question:
I develop a ruby on rails application on my laptop. Rails has WEBrick installed as an out of the box APPLICATION server.
I deploy my app on amazon web services elastic beanstalk.
I choose The configuration: Ruby 2.2 with Passenger version 2.0.8, which contains:
64bit Amazon Linux 2015.09 v2.0.8 running Ruby 2.2 (Passenger Standalone)
Ruby 2.2.3
RubyGems 2.4.5.1
Passenger 4.0.59 - Application server
nginx 1.8.0 - Web server.
When I deploy my app, does elastic beanstalk automatically replace WEBrick with passenger??? Or-- do I need to install the passenger gem myself?
Thanks!

Figured it out. I used the AWS GUI console online to download the virtual server's instance logs. I checked the ed-activity.log file and saw that the server was started with passenger.
So, yes, Amazon Elastic Beanstalk automatically runs passenger even without the passenger gem in the gemfile.
Side note, when I tried to deploy the rails app with the passenger gem, I ran into a lot of problems. AWS EB runs passenger standalone 4.0.59 while HomeBrew installs passenger 5.0~something or other... This conflict will take down your entire server instance.

Related

Is it possible to run puma and passenger in a same nginx server

We have a production machine runs on Nginx + phusion passenger. Passenger is pointing to ruby verions 2.3. Want to deploy another application into the same server in which we require, ruby version 2.4+.
I believe, we cannot use that with the passenger any more as it is already pointing to a ruby version. So thinking to use puma for the other app with ruby version 2.4.
Is it possible to run puma and passenger in a same nginx server ?

Running nginx in rails automatically

I am using rails 2.3.9, rubygems 1.8.24, ruby 1.9.3 and Windows 7 ultimate 64-bit
I just installed nginx as my web server through passenger. Now I want to run nginx as my default server such that when i run ruby script/server, it runs instead of the default WeBrick. Is there any way to do this? Thanks a million.
Nginx doesn't work the way you described. Once it is started, you won't need to run script/server, the rails app will be run at the same time when the Nginx/Apache started.
So, just deploy your rails app following the 'Passenger' manual( in development mode), and you will get your app always running.
so, as conclusion, we can tell that, when deploying a Rails app, Nginx and Apache is in the same group( work together with Passenger), and Mongrel/Webrick/Thin is another group(script/server approach).
You may want to take a look at Foreman.

How to deploy Rails project in Nginx server using passenger?

In my local, I am using werbrick application server for my localhost.
I have Ruby version 1.9.2 .and Rails version 3.1.
How to deploy On live,with Rails Project On Nginx Server?
And What will be the application server (like passenger module with apache) can be used with Nginx server for Rails 3.1 application?
This blog post should give you a good starting point. This one here goes a little deeper in detail. Note: I used these to get nginx running on my local development machine (OSX 10.7) and to host different rails apps locally without using Webrick. Probably there is more to take care of on a live / production system.

Passenger & Rails refuse to start up in production environment

I have a production server that refuses to start up in the 'production' environment. it recently ran Rails 2.x and Passenger 1 (or 2 can't remember) just fine. Upgraded Rails & Passenger and now it starts up in the development environment even though Passenger docs say it should default to production. We haven't changed anything in its default setup.
Though I just tried adding RailsEnv production to the Virtual Hosts file...to no effect.
How can I troubleshoot this? The only output I see in the console is:
server:current elvis$ rails c
Loading development environment (Rails 3.0.3)
and trying to hit app with a web browser presents this dialog after a long delay (30+ secs)
Mac OS X Server 10.5.8
Rails 3.0.3
Passenger 3.0.0
MySQL: 5.0.82
Did you install Passenger to Nginx or Apache? You start the Rails app by running the webserver, not rails c. Nginx, for example, will then load the Passenger module which will run your Rails app as needed. So, startup Nginx or Apache and you should be good to go.

How to configure Ruby ob Rails for XAMP server?

I have installed Ruby On Rails Application on my harddrive, and i am using XAMPP server. But i was not able to configure it to use on XAMPP server, do Ruby on Rails run on XAMPP server or need some other server like webrick or lighttpd...??
It does not run on XAMPP. It can be integrated in Apache by using Phusion Passenger, but AFAIK it's not available for windows.
So, if you have windows, you'll have to use mongrel or webrick or any other win32-compatible server. I think mongrel is best for you.

Resources