Complete Newbie needs help!

Brad wrote:

In response to marnen

Learn to use the quoting feature in your e-mail or forum client!

, it points to apples ( i think ): /usr/local/bin/ ruby

I don't think that's Apple's Ruby. Do a ls -l on that to see if it's a symlink and, if so, to what. If it's Apple's, it should point to something in /Library/Frameworks. If it's Rubystack's...well...I'm not sure. Check docs for where Rubystack installs stuff.

If I were you, I'd remove Rubystack and just use Apple's Ruby.

Brad

Best,

Marnen Laibow-Koser wrote:

I do not think I would advise using SQLite -- it's kind of underpowered for Rails, as I understand. I would, however, suggest using PostgreSQL instead of mySQL.

I'm not suggesting use SQLite for production, but for development. SQLite is just fine, and is plenty powerful. Not to mention for someone just getting into Rails, one less thing to deal with - setting up a whole database server like MySql and Postgres. SQLite is built into OS X, and as I've reminded myself, the gem is already installed in OS X. (Many services and applications use SQLite as their backend database - Safari, Firefox to name two)

Hey john,

How do i make mongrel the default server?

Brad

Something fundamental is wrong here. Rails should not be this hard.

First of all, you have installed RubyStack (I asume Bitnami) on your Mac, which is really not the best idea ever. OSX comes with ruby and rails preinstalled. The only thing you need to install is a database. The Bitnami stack is cool for deploying cookie-cutter installs to clusters of production servers, but is really asking for a mess of conflicts on a development machine.

I would begin by uninstalling the Bitnami stack. There is an uninstaller in the application folder. Run it, get some tea, then come back. The uninstaller will not delete the stack's directory because they aim to preserve your data (application/DB data). So after running the uninstaller, just drag the whole folder to the trash.

Next, do the following at a terminal window:

which ruby ruby -v which rails rails -v

You should get back /usr/bin/ruby ruby 1.8.7 (on Snow Leopard, maybe different on Leopard) /usr/bin/rails Rails 2.2.2 (again on SL, Leopard may be different)

If this checks out, go to mysql.org, downloads, community edition, and pick the latest .DMG for OSX. Install. Install the startup script. If you are on Leopard then install the preference pane. If you are on SL, then go here: http://www.swoon.net/downloads/MySQL.prefPane.zip and install the 64 bit pref pane.

Next, open up terminal again and do the following:

Leopard: sudo gem install mysql −− −−with−mysql−config≡/usr/local/mysql/bin/ mysql_config

Snow Leopard: env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql- config=/usr/local/mysql/bin/mysql_config

(note there are two dashes after 'mysql' then a space, then two more dashes before 'with')

Crack your knuckles, and in the terminal do the following:

cd rails testapp -d mysql cd testapp script/server

Open up your web browser and go to http://localhost:3000 and see if you can see the "welcome aboard" message. If not post back exactly what happened at which step.