Here is my case:
For production I use Heroku.
The question is what should i use for development:
My alternatives are:
Built in Webbrick (or Mongrel)
Passenger with Nginx
The question Im asking myself is:
Why would I use the second alternative when I will upload my application to Heroku anyway. Isnt it better to just use Webbrick/Mongrel instead then for development?
Thanks
I deploy to Heroku a lot and use either Webrick or Thin. No real point in setting up a more complex environment.
The most common use case for Nginx or Apache in development, is when the project makes use of specific features in either server. Since you're deploying on Heroku, there is as far as I know no way of configuring the server setup.
So I can't think of a reason why you should use Nginx while developing.
Related
I must configure my RoR vps hosting for my rails app, but on my localmachine i simple use webrick...
Are any ways to do this on server, so that it will be faster, and also, if it reboot's or memory down, or something that call's shutdown of server, then it automatically starts?
Also how about rails enterprise?
Now i have clean ubuntu server, and rvm on it
Follow this tutorial, it's great for beginner and will answer all your questions: http://coding.smashingmagazine.com/2011/06/28/setup-a-ubuntu-vps-for-hosting-ruby-on-rails-applications-2/
Which webserver to use depends on many things. Among others, there's Thin, Unicorn, Rainbows, Puma, and counting.
I suggest you look on google (or even here, I'm pretty this was answered before) for comparisons between ruby webservers, so that you can know what situation each of them are adapted to, and which one will fit your needs best.
For production deployment you need to install nginx or apache,
nginx is lightweight ,consider installing nginx,
Now there are various ways simple and easy to install is passenger with nginx
Or simply you can use nginx+unicorn or nginx+thin you can find various article just google it.
I am new to Ruby on Rails. I have been working as junior developer and most of time working on localhost so don't know how to launch Ruby on rails application, How to Configure Ruby on rails application and how to deploy it.
often I came accross following terms but don't know It's meaning and how to use them and where to use them.
Apache
Phusion Passenger
Heroku
nginx
Please Help me and also looking forward to any good tutorial to learn all that terms.
Thanks.
I think there is quite a lot of resources on the web for this, but :
Heroku is a platform as a service. Basically, you push your rails app to a git remote, and that's it, deployed. You can manage addons, workers, and processes from CLI, and scale up/down if you need. Probably the most painless way to start with.
Apache & nginx are two werbservers, I'd say they are the most common in the rails world. Nginx is the latest of the two and it seems to be better for most of the tasks, but if you want to know which to choose, there is several posts on the internet for that too.
Phusion passenger is the bridge (or one of the available bridges) between your rails app and your webserver. If you've done php before, think of it as mod_php.
Since this is all new to you I'd advise that you start with hosting on Heroku. You can do a lot with the free version and it's arguably the easiest way to get started with hosting your rails website. Check out the getting started guide from Heroku. There's also another beginners guide here.
Once you feel comfortable with Heroku your next step could be looking into hosting on your own virtual private server (VPS). The setup is much more manual but things that would cost extra money on Heroku are now free if you set it up yourself on your VPS. Here is a great article on VPS hosting.
For reference, I was hosting websites on Heroku for about a year before I started looking into hosting on my own VPS. Now what I do is start by hosting my projects on Heroku since it's the fastest way to get up and running. Then if the website is successful I transition to a VPS.
I'm a newly converted LAMP stack developer and wondering how to deploy a rails version of our large scale app.
Our servers currently have:
CentOS
Apache 2.x
MySQL
I've read about products that aid in setting up with this stack (Passenger, etc) but I'm concerned with speed and server load (as our app is already a high trafficked one).
How are people deploying rails applications for production use on a similar setup?
How could I setup rails to use this existing stack without adding anything else (or only adding production scale components to it)? -- Sort of a LAMR of sorts (Linux Apache MySQL Rails)
NOTE: The setup will still serve existing projects that are built with PHP -- so the setup can't really break any existing stack functionality
Passenger is a good option and is already used by lots of high-traffic sites in production.
ad. 1. As you already said, Passenger + REE is popular choice.
ad. 2. You could try to run it with lightweight app server like thin or unicorn. http://articles.slicehost.com/2009/4/17/centos-apache-rails-and-thin
Is it possible to not use Passenger and deploy with just Apache and MySQL?
I don't believe you can run rails with only apache and mysql in such a way. Much like the way mod_php takes care of processing the PHP for Apache, a module like passenger (www.modrails.com) takes care of processing the Rails application for you.
You can use the PassengerEnabled off (more info) setting in the vhost to disable passenger for the PHP apps. (although your php app will work fine as long as it is not placed in your rails app without this setting.)
About production scale settings. I believe that Twitter used to use apache as a load balancer to a number of mongrel http-servers. (see this article for some extra information). As you can see, caching (e.g. memcached) can provide a huge boost to your app if implemented well.
Are there any easy-to-configure webserver with ruby for Windows ?
I am hoping to find a webserver that can easily be configured to work with Ruby on Rails or Sinatra.
Anyone know of any ?
I use Sinatra+Thin on Windows, sometimes behind either Apache or Nginx as a reverse proxy (to speed up serving static files and to create a pool of 2-4 server instances). The speed is not as good as it is on Ubuntu with similar (or lesser) hardware, but at work I have to use certain servers allocated to me.
To use Thin with Sinatra, simply install Thin, and Sinatra will use it. If you need further help configuring Apache or Nginx, post more questions (after searching the web, of course).
If you want easy, stay with WEBrick.
If you want a production server, go with Apache + Passenger. But that won't be as simple as just using WEBrick.
Probably it is not answer you want but: http://rubyinstaller.org/. Installation is easy - follow instructions to install rails.
Second step is enable/configure port/application in firewall. Because ruby server works on port 3000 but http is common on port 80.
BUT this RoR environment is for development, so don't expect high performance.
I am am a newbie in Ruby on Rails development and I am learning this fantastic framework fast and easy. The only problem (which is a big one) is how to deploy.
I have tried a Linode StackScript which installs Ruby, Rails, Passenger and Nginx and I have made a "cap deploy" and all files was sent to the server but how on earth do I get this public. When I visit my website (IP) it seems to be down or not responding. Is there anything I need to do after deployment to make my app available to the web?
Thankful for all help, I really want to slay the deployment beast!
For ease of deployment, and scalability, have you looked at Heroku instead of hosting your own server?
That would make the process of deploying as simple as git push heroku