Run RoR on WAMP or on apache under windows - ruby-on-rails

Is it possible to run ror on apache under windows environment? I am having so much trouble with webrick server lately.

You should be able to do so with Passenger / mod_rails.
Here's a relevant Stack Overflow answer:
How to install Ruby on Rails alongside WampServer?

Related

How do I get Passenger to deploy a RoR app on Ubuntu 12.04 LTS?

I'm trying to get a simple 'hello world' RoR app deployed using Apache/Passenger on Ubuntu 12.04 (via Linode). I followed the directions on the Phusion Passenger documentation site. I get the Passenger error screen that says:
Ruby (Rack) application could not be started
The backtrace is here: http://pastebin.com/Sr4PaQvB
My apache virtual host config is here: http://pastebin.com/q2vb0hX8
One thing that is confusing me is why Passenger is not using the ruby (and gems) that I have installed via RVM even though I specifically use SetEnv and 'PassengerRuby` to tell it where to look. I appreciate any advice! Thanks!
The reason why Passenger wasn't loading up the right ruby/gems was because RVM wasn't installed correctly. I reinstalled RVM and reconfigured my app setup for the correct gems and all was well.

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.

Recommended development web server for Rails 3.1 and Ruby 1.9.2

I have been using Mongrel successfully with rails 2.* and 3.0* development, with ruby 1.8.7.
I recently started working with Rails 3.1 and ruby 1.9.2. I got my test app running with WEBrick. I don't like WEBrick. If I forget and simply close the WEBrick terminal window instead of going into the window and issuing a Control-C to WEBrick, the server port (3000) stays in use, and I can't run 'rails server' again until I log out everything and get WEBrick cleared out of the port table. Mongrel never had that problem.
I do have a build problem with Mongrel and ruby-1.9.2. I get multiple header files in the build, some referring to ruby-1.9.1 and some ruby-1.9.2. What a mess.
What is the recommended development web server for my config, which is 32-bit Ubuntu Natty with Rails 3.1 and ruby 1.9.2?
Webrick works well for me. The only problem I had is that it did not work well with https secure. The solution was to only run https on staging and production, not on development machine.
I use the dev machine only as the server, and develop on Windows machine with Notepad++. I think it works well, after using a horrible Rails IDE. (I used to use Visual Studio and love it.) Access the web page through local IP and port. It's a cheap, fast easy solution for Windows users.
I am running Ubuntu 11.04, Rails 3.07, Ruby 1.92 with RVM, and PostgreSQL. RVM is supposed to make life easy for Ubuntu users, because Ubuntu uses a different version of Ruby.
To kill the server process running on port 3000: xxxx is the value returned from the first line.
$ lsof | grep 3000
$ kill -9 xxxx
This could easily be combined into one line or an alias killserver or similar.
Thanks for the various port listener kill commands, I will construct something simple to clear the WEBrick's irritating habit, and continue to use it. Chasing a development web server issue is low on my priority list; they should just work.
You can see from my questions that my Linux skills don't go very deep into the kernel.

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