best cricut
Jan
20
2009
--

Install Ruby on Rails (RoR) on Windows (zlib.dll error)

Although Orite has been focusing on PHP development for quite few years now, we are open to new web technologies and always exploring new tools and learning new skills. I still remember when we first heard Ruby on Rails few years back, we were quite amazed about the raid development framework, and the simplicity of the Ruby syntax (which is really OO and human readable). After the recent PHP framework research, we still not 100% happy with any framework in the PHP world. So we decide to take a look at RoR again and try to get some inspiration, and if someday when RoR rules the world we would not be too far behind hopefully. After digging the net, there's no one RoR package that's up to date and easy to install for windows, I guess that's because most the developers are on Macs and Linux. Although we have Linux as testing servers and Mac as graphic stations, all our web developer are happy windows users. We were trying to follow the instructions on RoR wiki, however the One-Click Installer is bit out dated (since official RoR website recommends Ruby 1.8.7). So here's our own instruction of getting RoR on Windows,
  1. Download the binary package from official Ruby download page
  2. Unzip and put in to a folder, say c:\ruby
  3. Add c:\ruby\bin into the environment path (if you don't know how, here's the official Microsoft How To Manage Environment Variables help)
  4. Get the latest RubyGems from RubyForge, and unzip it into a folder
  5. Now launch CMD and goto the RubyGems folder, then type >ruby setup.rb to setup RubyGems
  6. Here comes the problem, when we try to install rails by issuing the command >gem install rails Window alerts an error about missing zlib.dll, and ruby only comes with the zlib.so file under the lib\i386-mswin32 directory. To fix it you need the zlib.dll file under ruby\bin\ folder, if you have apache for windows installed, simply grab the zlib.dll from apache\bin folder, which should work. Otherwise you need to download zlib.dll from any of the dll hosts by search on Google.
  7. The the >gem install rails command should work
  8. And you may install mongrel, the http server for RoR application by >gem install mongrel
Then the RoR is ready to go, you may follow instructions on http://rubyonrails.org to start coding in Ruby for web development. If we don't get too busy with PHP dev work or too bored with RoR, we will post back any interesting findings in RoR from the perspective of PHP developers.

Copyright Orite Group Pty Ltd | Powered by WordPress | Theme: Aeros 2.0

https://www.runthemusic.com/