X

News, tips, partners, and perspectives for the Oracle Solaris operating system

Setting up Rails

Guest Author

Step 1: Get Ruby

Open a terminal and install the Ruby package: 

bleonard@opensolaris:~$ pfexec pkg install SUNWruby18
DOWNLOAD PKGS FILES XFER (MB)
Completed 3/3 11334/11334 18.84/18.84
PHASE ACTIONS
Removal Phase 7/7
Update Phase 57/57
Install Phase 13063/13063
bleonard@opensolaris:~$

Step 2: Install Rails

bleonard@opensolaris:~$ pfexec gem install rails --include-dependencies
Bulk updating Gem source index for: http://gems.rubyforge.org
Successfully installed rails-2.1.0
Successfully installed rake-0.8.1
Successfully installed activesupport-2.1.0
Successfully installed activerecord-2.1.0
Successfully installed actionpack-2.1.0
Successfully installed actionmailer-2.1.0
Successfully installed activeresource-2.1.0
Installing ri documentation for rake-0.8.1...
Installing ri documentation for activesupport-2.1.0...
Installing ri documentation for activerecord-2.1.0...
Installing ri documentation for actionpack-2.1.0...
Installing ri documentation for actionmailer-2.1.0...
Installing ri documentation for activeresource-2.1.0...
Installing RDoc documentation for rake-0.8.1...
Installing RDoc documentation for activesupport-2.1.0...
Installing RDoc documentation for activerecord-2.1.0...
Installing RDoc documentation for actionpack-2.1.0...
Installing RDoc documentation for actionmailer-2.1.0...
Installing RDoc documentation for activeresource-2.1.0...
bleonard@opensolaris:~$

Step 3: Update Your Path

Add the following to .bashrc (found in your home directory):

#
# Rails
#
export PATH=$PATH:/usr/ruby/1.8/bin

Then source the file to set the path:

source ~./bashrc

Step 4: Create a Project

bleonard@opensolaris:~$ rails test_project
create
create app/controllers
create app/helpers
create app/models
...
create log/production.log
create log/development.log
create log/test.log
bleonard@opensolaris:~$

Step 5: Start the Server

bleonard@opensolaris:~$ cd test_project/
bleonard@opensolaris:~/test_project$ ruby script/server
=>⁞⁞ Booting WEBrick...
=> Rails 2.1.0 application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options

Step 6: Test


Browse to http://0.0.0.0:3000.


Join the discussion

Comments ( 1 )
  • awmyhr Wednesday, July 2, 2008

    This is great, but how about SproutCore? I can't get past the mongrel dependency, as fasthtreads seams to not work?


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.