Got your own house? Here some ideas for your painting the walls.
Using MacPorts To Install Ruby 1.9.1 and Rails 2.3.0 RC1
WARNING: If you want to live on the edge, please continue with the
steps
below. Also, please be aware that all gems are not fully compatible
with
Ruby 1.9.1 stable release (i.e. 1.9.1p0). Furthermore, this
installation requires you to remove ALL Ruby related gems and ports
because
we are performing a clean install. Lastly, I am using an
experimental machine (i.e. Apple PowerMac G5) to complete this task and
I
would
NOT advise the below actions within a production environment.
0) Remove Previous Ruby Ports (i.e. ruby, ruby19, rb-*, and so on) and
Gems
a) Ports
sudo port uninstall <port-name>
sudo port clean <port-name>
Note: Execute the above for all ruby related ports.
b) Gems
rm -rf /opt/local/lib/ruby
rm -rf /opt/local/lib/ruby19
Note: You may not need to execute both commands and this really
depends on what you have installed and how.
1) Remove Rake ( Optional If It Does Not Exist )
sudo rm -rf /opt/local/bin/rake
2) Install Ruby 1.9.1, SQLite3, and Mysql 5 Ports
sudo port install ruby19 +nosuffix
sudo port mysql5 +server
sudo port sqlite3
Note: The above ruby19 install generates the required executables
without the extension.
3) Install Rack, Rake, and Rails 2.3.0 Ruby Gems
sudo gem install rack
sudo gem install rake
sudo gem install rails --source=http://gems.rubyonrails.org
4) Install SQLite 3 Ruby Gem
sudo gem install sqlite3-ruby
5) Install MySQL 2.8.1 Ruby Gem
sudo gem install kwatch-mysql-ruby --
--with-mysql-config=/opt/local/lib/mysql5/bin/mysql_config
6) Install Thin
sudo gem install thin
7) Generate Rails Test Application
rails test
8) Change To The Root Of Rails Application
cd test
9) Start Thin
script/server thin
Note: The above command produces the above warning message:
warning: encoding option is ignored - N
10) Navigate To The Site Using Your Browser:
URL: http://localhost:3000
Result: You should see the "Rails Welcome aboard" page.
11) Now, Let Us Generate A Simple Blog
script/generate scaffold blog title:string text:text
Note: The above command produces the above warning message:
warning: encoding option is ignored - N
12) Migrate The Database
rake db:migrate
13) Navigate To The Site Using Your Browser:
URL: http://localhost:3000/blogs
and interact with the Rails application to verify that things are
working.
14) If you made it this far,
you are running Rails 2.3.0 RC1 and Ruby 1.9.1.
Good luck,
-Conrad



0 Comments