Saturday, August 6, 2011

Installing Ramaze on Ubuntu (11.04)

I installed Ramaze (a lightweight web frame work. "RailsLite") on my Ubuntu 11.04.

1. Resources.
Ramaze Home: http://ramaze.net/
My Previous Installation on Ubuntu: http://socrateos.blogspot.com/2011/03/installing-ramaze.html

2. Install.
$ sudo gem install ramaze
[sudo] password for socrateos: 
Successfully installed innate-2011.04
Successfully installed ramaze-2011.07.25
2 gems installed
Installing ri documentation for innate-2011.04...
Installing ri documentation for ramaze-2011.07.25...
Installing RDoc documentation for innate-2011.04...
Installing RDoc documentation for ramaze-2011.07.25...
                   
$ ramaze -v    # be sure to have /var/lib/gems/1.9.1/bin in your PATH
2011.07.25

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

3. Create a Ramaze app.
$ cd work/ruby/ramaze
$ ramaze create myapp
The application has been generated and saved in myapp
$ cd myapp
$ ls
app.rb  config.ru  controller  layout  model  public  spec  start.rb  view
$ ramaze start
[2011-08-06 07:51:42] INFO  WEBrick 1.3.1
[2011-08-06 07:51:42] INFO  ruby 1.9.2 (2010-08-18) [i686-linux]
[2011-08-06 07:51:42] INFO  WEBrick::HTTPServer#start: pid=6063 port=7000

4. The Result (with Webrick) at http://localhost:7000.




















5. Run it with Unicorn instead of Webrick. (See Unicorn Installation)
$ cd work/ruby/ramaze/myapp
$ unicorn
I, [2011-08-06T11:33:11.738433 #1976]  INFO -- : listening on addr=0.0.0.0:8080 fd=3
I, [2011-08-06T11:33:11.738779 #1976]  INFO -- : worker=0 spawning...
I, [2011-08-06T11:33:11.739553 #1976]  INFO -- : master process ready
I, [2011-08-06T11:33:11.740215 #1978]  INFO -- : worker=0 spawned pid=1978
I, [2011-08-06T11:33:11.740420 #1978]  INFO -- : Refreshing Gem list
I, [2011-08-06T11:33:12.628489 #1978]  INFO -- : worker=0 ready

6. The Result (with Unicorn) at http://localhost:8080.
Great. It just works!

No comments:

Post a Comment