Ruby on Rails install/config

Hello,

I am installing Rails, with MySQL, based on the steps found at:

The step for MySQL says:

"Now that we have the Rails framework installed on our system, we need a database connector, in order to connect our Rails framework to the MySQL database installed.

C:\> gem install mysql

Running the above command does the trick most of the time. However we need to take care that MySQL gem gives various problems related to the installation path. In order to resolve that, we can compile it with various options manually defined."

Well, maybe I am having the aforementioned problem with the installation path...when I enter "gem install mysql" (with MySQL 5.1 already installed and tested), I get a heap of "No definition for XYZ" messages. I understand these may be related to Rdoc. Is there any way to to confirm whether the database connector is functional and/or I have set up MySQL 5.1 correctly to play nice with Ruby on Rails?

P.S. This configuration installs Ruby, Rails, MySQL, Mongrel, Git, and uses Webrick. I am solid on using the first 3 ;). Is Mongrel the de-facto app server for Ruby? Is Git the best/most popular (i.e. supported) source control? Should I use Webrick or try to use Apache or some other web server? Are these loaded questions that will inadvertenetly cause me to start some apocalyptic flame war?

These are the questions that plague men's souls...

Hi Brian,

I’m about 6 months into my RoR journey, and here’s a few ideas:

Every time I’ve installed the mysql gem, it gave me those exact errors. I believe they are rdoc related, and haven’t affected the gem’s performance at all. If you want to do a brief test, just bring up irb, and type:

require ‘rubygems’

require ‘mysql’

If the last command returns true, you’re good.

Second - I use mongrel in development, but jump to Thin for serving my apps in production. (While employing nginx to do the proxy routing from port 80 to 3000, or whatever.) I’ve found mongrel to be great thus far. However, Webrick is okay, if you’re not pushing it too terribly hard.

As for SCM, Git rocks my world. Because it’s distributed, I always have a full copy of my repo, regardless of where I am, or what I’m doing. (For more info, see this Tech Talk by Linus Torvalds, creator of Git: http://youtube.com/watch?v=4XpnKHJAok8 )

That’s my two cents…

Nicholas Young nicholas@nicholaswyoung.com

I have found that Ruby on Windows has several bug and annoiancies since most of the developers use Linux or Mac. Since I have to use Windows, I had to solve the problem, but if you can switch from Win to something else.

Ruby connector for MySql 5.1 is bugged, so you should use 5.0, just remove 5.1. and use 5.0. Another alternative is to use JRuby. JRuby uses JDBC to connect to databases and is much better quality in general, especially becasue is in Java and is not platform dependent.

As production server you can use Mongrel or Passenger. I suggest Passenger + Ruby Enterprise + Apache, but for Unix only.

Again, if you can avoid Windows for developemnt and production. Windows shell is very limited and Rails ahs a lot of CLI tools and using those tool with Windows is very boring.