gem install rails
rails /home/mariuz/mynewapp -D firebirdBut it generated sqlite config so i had to delete all and
I have configured this way my database : first i have created in flamerobin an empty firebird db /var/lib/firebird/2.5/data/rubyonfire.fdb
Be aware about indentation
cat config/database.yml
ruby script/generate scaffold Client name:string address:string email:string remark:text
rake db:migrate
You can create the table structure by hand if you wish so
I have re-read the ruby guide
so i did these commands while following the official guide
rake db:createbut database was already created in flamerobin
script/generate controller home index vi app/views/home/index.html.erband write something there, start the server with
script/serverand now you can see something in browser
http://localhost:3000/

I have created the table and one sequence in firebird db
CREATE TABLE posts ( id BIGINT NOT NULL PRIMARY KEY, name VARCHAR(255), title VARCHAR(255), content VARCHAR(255), timestamps timestamp ); CREATE GENERATOR POSTS_SEQ;
I have ran the scaffold again to generate the posts model/view/controller
script/generate scaffold Post name:string title:string content:textand then
started the server
script/server
of course I have modified the route and added an link as in tutorial and now i can add and modify blog posts
note: in new rails route is defined this way in config/routes.rb
map.root :controller => "home"
http://localhost:3000/posts



Follow the normal ActiveRecord conventions for table names, primary key columns, etc. The one “extra” you’ll need for Firebird is that you’ll have to create a generator for any tables that require a sequence-based primary key. The default naming convention is TABLENAME_SEQ. So if you have a users table, you would need to create a corresponding USERS_SEQ generator
You don't need to create before insert triggers ! rails reads the value from sequence and then increments it in ruby code, Yay!






