Is all I need mod_rails and ruby 1.9.2? What is the best resource for production setup of rails.
The first time I deployed a Rails app, I simply read this.
Once this config done, I recommend you learn how to use capistrano.
Related
I've developed my Rails project locally and want to deploy it on my Ubuntu VPS. Now I've installed the gems on the VPS and copied my Rails App code to it. I can execute rails s --binding=0.0.0.0 in a putty session to the VPS and the website can be access from the Internet. The problem is when I close putty, the website is down. How to start my Rails App in a way that it still alive even if I closed putty?
Using rails s is not the way to go. It will use Webrick(or a different one if you choose) to handle the requests and it can be quite slow.
You should setup a production stack for serving your website.
Here is one of the best tutorials I've seen about how to deploy a Rails app to a production server(VPS).
In short you gonna need install RVM or Rbenv, Ruby, some libs, Database, Nginx and Passenger. You have alternatives too. But this is the basic.
I recommend using Capistrano for deploy. You can choose another deployment tool also, or none.
rails s it is best for development only.
I want to implement capistrano in my ruby on rails project. I am using MongoDB as database .
I install capistrano gem.
capify .
[add] writing './Capfile'
[add] writing './config/deploy.rb'
[done] capified!
It gives me file deploy.rb inside the Config. What should i do inside. so where do i have to put mongoid.yml ? Working code is helpful for me to do or some hints is appreciable.
You should first be clear about why you want to implement capistrano :-)
Capistrano is a tool for making deployments easier - it allows for executing commands in multiple remote machines, via ssh.
For a default installation of a Rails App with mongodb, you don't need to have anything related to mongodb in the capistrano deploy.rb file.
You would add some mongodb stuff in this file if there is some mongodb related task that you want to accomplish every time the code is deployed to the remote servers.
Example: Here is a capistrano recipe example to synchronize local mongodb with production
I would recommend that you familiarize yourself with the basics of capistrano by watching the railscast episode on capistrano tasks.
Put mongoid.yml in /config, and type cap deploy in /.
I am having excellent experience in Java and eclipse, But new to Ruby on Rails, can anyone point to the best resources, or step which i can follow to start with Ruby On Rails development and enviornment setup for windows.
I think Rails Tutorial is a best place for you to start learning, setup environment and development for Ruby on Rails:
Rails Tutorial
Rails Guide and about API
Some videos Rails Cast
Book Rails 3 way
One more thing, I think many Rails developers will not build Rails application on Window.
I have been using it fine. You just have to setup the correct run config to run rails -s
I'm very new to ruby and I can run ruby scripts on command line easily, but I want to output my script to a browser, not just using the command line.
Your help will be much appreciated, thanks.
Passenger is probably the easiest way to run Rails applications.
I'd recommend either Passenger or Unicorn, both of which are extremely popular in production environments. Passenger is typically easier to setup.
See this blog post:
"Install RVM, Passenger, Nginx and Rails 3 on Ubuntu Lucid Lynx". You can use WEBrick/Thin for development perhaps.
Please provide me the guidance for deploying the ruby on rails application in apache in lamp without installing Ruby or rails?
You need it. Install ruby with all dependencies and install Phusion Passanger. The way I read your question was like this, lets go ride the bicycle with no wheels, let me check my email with no browser - it does not make sense.
you may use Phusion Passenger with Apache for deploying the ruby on rails application.
If it is Ubuntu, all the dependencies are just an apt-get line of code away, so it is well worth install it someway