Firebird 2.5 and ruby on rails 4.2

975 Views Asked by At

I am trying to use active-fb-record but I have had problems. Can you help me? I'm using Rails 4.2.2 and Ruby 2.1.6 (32-bit version rubyinstaller)

I installed gem active-fb-record and fb and with this I didn't have problem. The problem begin with i try to run the command rails s. This is my error.

    Microsoft Windows [Versión 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Reservados todos los derechos.

C:\Users\Steny>gem install activerecord-fb-adapter
Successfully installed activerecord-fb-adapter-1.0.1
Parsing documentation for activerecord-fb-adapter-1.0.1
Done installing documentation for activerecord-fb-adapter after 1 seconds
1 gem installed

C:\Users\Steny>cd Documents\Proyectos

C:\Users\Steny\Documents\Proyectos>rails new firebird_app/RoR
      create
      create  README.rdoc
      create  Rakefile
      create  config.ru
      create  .gitignore
      create  Gemfile
      create  app
      create  app/assets/javascripts/application.js
      create  app/assets/stylesheets/application.css
      create  app/controllers/application_controller.rb
      create  app/helpers/application_helper.rb
      create  app/views/layouts/application.html.erb
      create  app/assets/images/.keep
      create  app/mailers/.keep
      create  app/models/.keep
      create  app/controllers/concerns/.keep
      create  app/models/concerns/.keep
      create  bin
      create  bin/bundle
      create  bin/rails
      create  bin/rake
      create  bin/setup
      create  config
      create  config/routes.rb
      create  config/application.rb
      create  config/environment.rb
      create  config/secrets.yml
      create  config/environments
      create  config/environments/development.rb
      create  config/environments/production.rb
      create  config/environments/test.rb
      create  config/initializers
      create  config/initializers/assets.rb
      create  config/initializers/backtrace_silencers.rb
      create  config/initializers/cookies_serializer.rb
      create  config/initializers/filter_parameter_logging.rb
      create  config/initializers/inflections.rb
      create  config/initializers/mime_types.rb
      create  config/initializers/session_store.rb
      create  config/initializers/wrap_parameters.rb
      create  config/locales
      create  config/locales/en.yml
      create  config/boot.rb
      create  config/database.yml
      create  db
      create  db/seeds.rb
      create  lib
      create  lib/tasks
      create  lib/tasks/.keep
      create  lib/assets
      create  lib/assets/.keep
      create  log
      create  log/.keep
      create  public
      create  public/404.html
      create  public/422.html
      create  public/500.html
      create  public/favicon.ico
      create  public/robots.txt
      create  test/fixtures
      create  test/fixtures/.keep
      create  test/controllers
      create  test/controllers/.keep
      create  test/mailers
      create  test/mailers/.keep
      create  test/models
      create  test/models/.keep
      create  test/helpers
      create  test/helpers/.keep
      create  test/integration
      create  test/integration/.keep
      create  test/test_helper.rb
      create  tmp/cache
      create  tmp/cache/assets
      create  vendor/assets/javascripts
      create  vendor/assets/javascripts/.keep
      create  vendor/assets/stylesheets
      create  vendor/assets/stylesheets/.keep
         run  bundle install
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies.............................................
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.7.0
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.2
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile 0.6.2
Using nokogiri 1.6.6.2
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.6
Using loofah 2.0.2
Using rails-html-sanitizer 1.0.2
Using actionview 4.2.2
Using rack 1.6.4
Using rack-test 0.6.3
Using actionpack 4.2.2
Using globalid 0.3.5
Using activejob 4.2.2
Using mime-types 2.6.1
Using mail 2.6.3
Using actionmailer 4.2.2
Using activemodel 4.2.2
Using arel 6.0.0
Using activerecord 4.2.2
Using debug_inspector 0.0.2
Using binding_of_caller 0.7.2
Using bundler 1.10.4
Using columnize 0.9.0
Using byebug 5.0.0
Using coffee-script-source 1.9.1.1
Using execjs 2.5.2
Using coffee-script 2.4.1
Using thor 0.19.1
Using railties 4.2.2
Using coffee-rails 4.1.0
Using multi_json 1.11.1
Using jbuilder 2.3.0
Using jquery-rails 4.0.4
Using sprockets 3.2.0
Using sprockets-rails 2.3.2
Using rails 4.2.2
Using rdoc 4.2.0
Using sass 3.4.15
Using tilt 1.4.1
Using sass-rails 5.0.3
Using sdoc 0.4.1
Using sqlite3 1.3.10
Using turbolinks 2.5.3
Using tzinfo-data 1.2015.5
Using uglifier 2.7.1
Using web-console 2.1.3
Bundle complete! 12 Gemfile dependencies, 54 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.

C:\Users\Steny\Documents\Proyectos>DIR
 El volumen de la unidad C no tiene etiqueta.
 El número de serie del volumen es: 5464-39C3

 Directorio de C:\Users\Steny\Documents\Proyectos

24/06/2015  23:18    <DIR>          .
24/06/2015  23:18    <DIR>          ..
24/06/2015  23:18    <DIR>          firebird_app
               0 archivos              0 bytes
               3 dirs  265.474.629.632 bytes libres

C:\Users\Steny\Documents\Proyectos>cd firebird_app

C:\Users\Steny\Documents\Proyectos\firebird_app>cd RoR

C:\Users\Steny\Documents\Proyectos\firebird_app\RoR>bundle update
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies..............................................
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.7.0
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.2
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile 0.6.2
Using nokogiri 1.6.6.2
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.6
Using loofah 2.0.2
Using rails-html-sanitizer 1.0.2
Using actionview 4.2.2
Using rack 1.6.4
Using rack-test 0.6.3
Using actionpack 4.2.2
Using globalid 0.3.5
Using activejob 4.2.2
Using mime-types 2.6.1
Using mail 2.6.3
Using actionmailer 4.2.2
Using activemodel 4.2.2
Using arel 6.0.0
Using activerecord 4.2.2
Using fb 0.7.4
Using activerecord-fb-adapter 1.0.1
Using debug_inspector 0.0.2
Using binding_of_caller 0.7.2
Using bundler 1.10.4
Using columnize 0.9.0
Using byebug 5.0.0
Using coffee-script-source 1.9.1.1
Using execjs 2.5.2
Using coffee-script 2.4.1
Using thor 0.19.1
Using railties 4.2.2
Using coffee-rails 4.1.0
Using multi_json 1.11.1
Using jbuilder 2.3.0
Using jquery-rails 4.0.4
Using sprockets 3.2.0
Using sprockets-rails 2.3.2
Using rails 4.2.2
Using rdoc 4.2.0
Using sass 3.4.15
Using tilt 1.4.1
Using sass-rails 5.0.3
Using sdoc 0.4.1
Using sqlite3 1.3.10
Using turbolinks 2.5.3
Using tzinfo-data 1.2015.5
Using uglifier 2.7.1
Using web-console 2.1.3
Bundle updated!

C:\Users\Steny\Documents\Proyectos\firebird_app\RoR>rails generate scaffold Client name:string address:string email:string remar:text
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activerecord-fb-adapter-1.0.1/lib/active_record/connection_adapters/fb_adapter.rb:6:in `require': 126: No se puede encontrar el módulo especificado.   - C:/Ruby2
1-x64/lib/ruby/gems/2.1.0/gems/fb-0.7.4/fb.so (LoadError)
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activerecord-fb-adapter-1.0.1/lib/active_record/connection_adapters/fb_adapter.rb:6:in `<top (required)>'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activerecord-fb-adapter-1.0.1/lib/activerecord-fb-adapter.rb:1:in `require'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activerecord-fb-adapter-1.0.1/lib/activerecord-fb-adapter.rb:1:in `<top (required)>'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:76:in `require'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:72:in `each'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:72:in `block in require'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:61:in `each'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:61:in `require'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.10.4/lib/bundler.rb:134:in `require'
        from C:/Users/Steny/Documents/Proyectos/firebird_app/RoR/config/application.rb:7:in `<top (required)>'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:141:in `require'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:141:in `require_application_and_environment!'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:128:in `generate_or_destroy'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:50:in `generate'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
        from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.2/lib/rails/commands.rb:17:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

C:\Users\Steny\Documents\Proyectos\firebird_app\RoR>rails -v
Rails 4.2.2

C:\Users\Steny\Documents\Proyectos\firebird_app\RoR>ruby -v
ruby 2.1.6p336 (2015-04-13 revision 50298) [x64-mingw32]

C:\Users\Steny\Documents\Proyectos\firebird_app\RoR>

I use ruby on rails on Windows 7

1

There are 1 best solutions below

1
On BEST ANSWER

You need to install firebird 32bit version , to match mingw/ruby with the same bits (32/64)

Please install firebird 2.5.4 x32 with copy to system dir (checked) From http://www.firebirdsql.org/en/firebird-2-5/

Then install rubyinstaller (default is 32bits) Install Devkit DevKit-mingw64-32

unzip it in C:\rubydevkit open cmd.exe in start->run

cd rubydevkit 

run

ruby dk.rb init 

and

ruby dk.rb install 

to bind it to ruby installations in your path.

Then

gem install fb

and activerecord-fb-adapter will work without issues after compilation (also loading it)