Posts for: #Ruby on Rails

Released Sashimi 0.1.6

I just released a new version of Sashimi, with tiny fixes and a new home!

~

In fact the project is also hosted on RubyForge, now you can install the gem with:
$ (sudo) gem install sashimi
or with:
$ (sudo) gem install jodosha-sashimi --source=http://gems.github.com

If you wish, you can visit the project pages on GitHub and on RubyForge.

UPDATE The release 0.1.6 is broken, you are strongly encouraged to update your gem with the newest 0.1.7.

[]

Rails: Single File App

I took inspiration from the Pratik Naik post, and realized a more simplistic version of its Rails single file app. My implementation has only Rails as unique dependency.
require 'rubygems' require 'action_controller' require 'webrick' require 'webrick_server'

class HelloWorldController ‘Hello World!’ end end

ActionController::Routing::Routes.draw do |map| map.root :controller => “hello_world” end

DispatchServlet.dispatch :port => 3000, :server_root => File.dirname(FILE)

Update 2008-06-04: I just wrote another version which also uses ActiveRecord and a template.
require 'rubygems' require 'activerecord' require 'action_controller' require 'webrick' require 'webrick_server'

ActiveRecord::Base.establish_connection( :adapter => ‘sqlite3’, :database => ’tiny_rails.sqlite3’, :timeout => 5000)

[]