Linux and Open Source Blog

  • Home
  • WordPress Plugins
  • About
  • Contact

Category Archives: development

Install Ruby On Rails and getting started

Posted on January 29, 2008 by Linewbie.com Posted in applications/software, development, guides, how to .

Getting Started With Ruby On Rails

Installing Ruby on Rails (RoR) on windows, OSX and Linux. Generally there are 3 installations: OSX, Windows and Linux, and Linux install is the most easy one.

Windows:

Go to http://www.rubyonrails.org/, and download the package containing gems (windows installer).

Install the package.

Update the gem system via:

gem update –system

Update installed gems via:

gem update

When this is done install the relevant gems. I would suggest the following as a minimum:
*rails (for the framework)
Please note, that rails 2.02 is the newest version, you can install an older version via

gem install v1.2.6 rails

*mysql (for database assess)
*mongrel (webserver better when webrick)

When asked for the version you want to use, choose the newst version, that has win32 in the option.

OSX 10.4 and 10.5

Go to http://www.macports.org/ and download the correct version of the file (tiger/leopard).

Read through the installation guide: http://www.macports.org/install.php

Quick guide:
Install the correct xcode for your system.
Install the macports program (this can take a little while)
When done, do:

sudo port install ruby
sudo port install rb-gems (enabling gems under ruby)
sudo gem install rails (framework)
sudo port install rb-mysql (mysql for use under RoR)
sudo gem install mongrel (webserver)
sudo port install subversion (for easy install for remote plugins)

Linux (Ubuntu like / Debian based)

sudo apt-get update && sudo apt-get upgrade (getting newst list, and updateing software before continuing).
sudo apt-get install ruby subversion mysql libmysql-ruby1.8

sudo gem install rails
sudo gem install mongrel

And you should be set to go.

IDE for use with RoR:
Textmate (OSX), has very poor subversion integration, but good RoR integration
Not free
Eclipse (good integration, via plugins)
http://www.eclipse.org/ download plugins via Aptana website, for RoR support.
Free

Aptana (good integration via plugins) http://www.aptana.com/
complete IDE, eclipse based. Free
IDEA (good integration via plugins)
Complete IDE suite, with great integration of subversion, mysql and even jira for bugtracking.
Professional, but expensive.

Remeber to point your IDE to where your RoR / rails is installed for best integration:
Windows most often: c:\ruby\bin
OSX: /opt/local/
Linux: /usr/bin/ruby

Errors:

Linux:

sudo gem update –system

Which introduced this error:

/usr/bin/gem:23: uninitialized constant Gem::GemRunner(NameError)

whenever I tried to run rubygems. On the rails forum, I found a fix for it!. Simply add the line to the file /usr/bin/gem (may be different on a mac):

require 'rubygems/gem_runner'

after

require 'rubygems'

Source: http://www.nickpeters.net/2007/12/31/fix-for-uninitialized-constant-gemgemrunner-nameerror/

This error when installing gems:

extconf.rb:1:in `require’: no such file to load—mkmf (LoadError)

from extconf.rb:1.

Do:

sudo apt-get install ruby1.8-dev

4 Comments .
Tags: ror, ruby on rails .

Recent Posts

  • Does an un-confirmed Bitcoin transaction expire?
  • Looting of the Fox: The Story of Sabotage at ShapeShift
  • Decentralization, Scalability, and Fault Tolerance of Bitcoin
  • Stripe will soon accept Bitcoin payments
  • Zynga announces Bitcoin acceptance in game
  • How to import very large sql dump via phpmyadmin
  • How to compare the content of two folders automatically
  • Top 5 reasons to start experimenting with Linux
  • The day our mind became open sourced
  • Mark Shuttleworth wants to turn canonical (ubuntu) into the next Apple Inc.

Categories

  • applications/software (26)
    • browsers (2)
    • development (1)
    • information management (1)
    • Mobility (1)
    • multimedia (5)
    • office suites (2)
    • security (6)
    • servers (6)
    • system (2)
  • audio/video/pics (3)
  • Bitcoin (3)
  • books & literature (1)
  • cms/portals (1)
  • desktop environments (7)
    • gnome (2)
    • kde (5)
  • events/shows (3)
    • interviews (1)
    • people (1)
    • surveys (1)
  • games & gaming (2)
  • general topics (4)
  • guides (112)
    • how to (105)
    • tips (87)
    • tutorials (86)
  • hardware (8)
    • desktop & laptop pc (5)
    • gadgets & mobiles (2)
  • howtoforge (47)
  • internet/web (4)
    • design & development (2)
  • linux and open source blog (49)
  • linux.com (76)
  • linux/unix/os distros (113)
    • debian/ubuntu based (10)
    • mac/osx (2)
    • other distros (3)
  • news (217)
  • open source (8)
    • business & foss (2)
  • other (26)
    • uncategorized (26)
  • Programming (3)
    • PHP (2)
  • quotes & thoughts (10)
  • random stuff (4)
    • cool stuff (3)
    • funny stuff (1)
  • review/preview/tests (7)
  • wordpress/blogging (3)

Archives

  • July 2016
  • April 2016
  • January 2015
  • April 2014
  • January 2014
  • November 2013
  • February 2013
  • November 2012
  • April 2012
  • March 2012
  • January 2012
  • December 2011
  • August 2011
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2006

Recent Posts

  • Does an un-confirmed Bitcoin transaction expire?
  • Looting of the Fox: The Story of Sabotage at ShapeShift
  • Decentralization, Scalability, and Fault Tolerance of Bitcoin
  • Stripe will soon accept Bitcoin payments
  • Zynga announces Bitcoin acceptance in game
  • How to import very large sql dump via phpmyadmin
  • How to compare the content of two folders automatically
  • Top 5 reasons to start experimenting with Linux
  • The day our mind became open sourced
  • Mark Shuttleworth wants to turn canonical (ubuntu) into the next Apple Inc.

Categories

  • applications/software (26)
    • browsers (2)
    • development (1)
    • information management (1)
    • Mobility (1)
    • multimedia (5)
    • office suites (2)
    • security (6)
    • servers (6)
    • system (2)
  • audio/video/pics (3)
  • Bitcoin (3)
  • books & literature (1)
  • cms/portals (1)
  • desktop environments (7)
    • gnome (2)
    • kde (5)
  • events/shows (3)
    • interviews (1)
    • people (1)
    • surveys (1)
  • games & gaming (2)
  • general topics (4)
  • guides (112)
    • how to (105)
    • tips (87)
    • tutorials (86)
  • hardware (8)
    • desktop & laptop pc (5)
    • gadgets & mobiles (2)
  • howtoforge (47)
  • internet/web (4)
    • design & development (2)
  • linux and open source blog (49)
  • linux.com (76)
  • linux/unix/os distros (113)
    • debian/ubuntu based (10)
    • mac/osx (2)
    • other distros (3)
  • news (217)
  • open source (8)
    • business & foss (2)
  • other (26)
    • uncategorized (26)
  • Programming (3)
    • PHP (2)
  • quotes & thoughts (10)
  • random stuff (4)
    • cool stuff (3)
    • funny stuff (1)
  • review/preview/tests (7)
  • wordpress/blogging (3)

Archives

  • July 2016
  • April 2016
  • January 2015
  • April 2014
  • January 2014
  • November 2013
  • February 2013
  • November 2012
  • April 2012
  • March 2012
  • January 2012
  • December 2011
  • August 2011
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2006
Privacy Policy

Est. 2002

linewbie.com serving the linux and open source community since April 09, 2002

CyberChimps WordPress Themes

© Linux and Open Source Blog