Firebird News

Tuesday, March 27, 2012

Rails Migrations do work with rubyfb

Good news everyone migrations do work with latest rails 3.2.2 and latest rubyfb here is the proof
rails generate scaffold User name:string email:string
      invoke  active_record
      create    db/migrate/20120327192907_create_users.rb
      create    app/models/user.rb
      invoke    test_unit
      create      test/unit/user_test.rb
      create      test/fixtures/users.yml
       route  resources :users
      invoke  scaffold_controller
      create    app/controllers/users_controller.rb
      invoke    erb
      create      app/views/users
      create      app/views/users/index.html.erb
      create      app/views/users/edit.html.erb
      create      app/views/users/show.html.erb
      create      app/views/users/new.html.erb
      create      app/views/users/_form.html.erb
      invoke    test_unit
      create      test/functional/users_controller_test.rb
      invoke    helper
      create      app/helpers/users_helper.rb
      invoke      test_unit
      create        test/unit/helpers/users_helper_test.rb
      invoke  assets
      invoke    coffee
      create      app/assets/javascripts/users.js.coffee
      invoke    scss
      create      app/assets/stylesheets/users.css.scss
      invoke  scss
      create    app/assets/stylesheets/scaffolds.css.scss
mariuz@borki7:~/work/ruby/demo_app$ rake db:migrate 
==  CreateUsers: migrating ====================================================
-- create_table(:users)
   -> 0.2720s
   -> 0 rows
==  CreateUsers: migrated (0.2723s) ===========================================

4 comments:

corrado agusto said...

HI MARIUZ,
I tried setting up an ubuntu 10.4 box with firebird 2.5 and rubyonrails.
problem is that when I tried installing rubyfb-0.6.7 with sudo gem install rubyfb, I got following errors:



ERROR: Error installing rubyfb:
ERROR: Failed to build gem native extension.

/home/vagrant/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb
creating Makefile

make
compiling Connection.c
In file included from Connection.h:30,
from Connection.c:27:
FireRuby.h:35:25: error: ibase.h: No such file or directory
In file included from Connection.h:30,
from Connection.c:27:
FireRuby.h:48: error: expected ';', ',' or ')' before '*' token
In file included from Connection.h:34,
from Connection.c:27:

[...]

any idea?

corrado agusto said...

hi there, when I try to install rubyfb gem I get errors as follows:

ERROR: Error installing rubyfb:
ERROR: Failed to build gem native extension.

/home/vagrant/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb
creating Makefile

make
compiling Connection.c
In file included from Connection.h:30,
from Connection.c:27:
FireRuby.h:35:25: error: ibase.h: No such file or directory
In file included from Connection.h:30,
from Connection.c:27:
FireRuby.h:48: error: expected ';', ',' or ')' before '*' token
In file included from Connection.h:34,
from Connection.c:27:


in ubuntu 10.4, ruby 1.9.3

any idea?

Adrian Marius Popa said...

you need the firebird2.5-dev headers


sudo apt-get install firebird2.5-dev

corrado agusto said...

many thanks, fixed.