Wednesday, March 23, 2011

Installing Ramaze

Installed Ramaze.

1. Insallation
$ sudo gem install ramaze
============================================================

Thank you for installing Ramaze!
To create a new project:
$ ramaze create yourproject

============================================================
Successfully installed innate-2011.01
Successfully installed ramaze-2011.01.30
2 gems installed
Installing ri documentation for innate-2011.01...
Installing ri documentation for ramaze-2011.01.30...
Installing RDoc documentation for innate-2011.01...
Installing RDoc documentation for ramaze-2011.01.30...

$ sudo gem1.9.1 install ramaze
============================================================

Thank you for installing Ramaze!
To create a new project:
$ ramaze create yourproject

============================================================
Successfully installed innate-2011.01
Successfully installed ramaze-2011.01.30
2 gems installed
Installing ri documentation for innate-2011.01...
Installing ri documentation for ramaze-2011.01.30...
Installing RDoc documentation for innate-2011.01...
Installing RDoc documentation for ramaze-2011.01.30...


2. Check Installation
$ irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'ramaze'
=> true
irb(main):003:0> exit

$ irb1.9.1 
irb(main):001:0> require 'ramaze'
=> true
irb(main):002:0> 

$ ramaze --version
ramaze: command not found



3. Modify PATH environment so that ramaze command is available.

Add the folloing line at the end of .bashrc or .bash_aliases.
export PATH=/var/lib/gems/1.9.1/bin:$PATH
Then, test it again:
$ ramaze --version
2011.01.30

4. Create and run a simple Ramaze app.
$ cd work/ruby/ramaze/
$ ramaze --create blog
Found proto at: "/var/lib/gems/1.9.1/gems/ramaze-2011.01.30/lib/proto", proceeding...

       mkdir    
       mkdir    model
       mkdir    layout
       mkdir    view
       mkdir    public
       mkdir    public/css
       mkdir    public/js
       mkdir    spec
       mkdir    controller
      create    config.ru
      create    model/init.rb
      create    layout/default.xhtml
      create    view/index.xhtml
      create    public/favicon.ico
      create    public/css/screen.css
      create    public/ramaze.png
      create    public/.htaccess
      create    public/dispatch.fcgi
      create    public/js/jquery.js
      create    spec/main.rb
      create    start.rb
      create    app.rb
      create    controller/main.rb
      create    controller/init.rb

$ cd blog/
$ ruby start.rb
D [2011-03-24 07:00:23 $2352] DEBUG | : Using webrick
I [2011-03-24 07:00:23 $2352]  INFO | : WEBrick 1.3.1
I [2011-03-24 07:00:23 $2352]  INFO | : ruby 1.8.7 (2010-06-23) [i686-linux]
D [2011-03-24 07:00:23 $2352] DEBUG | : TCPServer.new(0.0.0.0, 7000)
D [2011-03-24 07:00:23 $2352] DEBUG | : Rack::Handler::WEBrick is mounted on /.
I [2011-03-24 07:00:23 $2352]  INFO | : WEBrick::HTTPServer#start: pid=2352 port=7000


At http://localhost:7000, you see the result.




5. Resources
Ramaze Home Page

1 comment:

  1. How to run ramaze application as new version does not have any start.rb file and ramaze.start is giving a command is invalid

    ReplyDelete