Closed rafaeldl closed 7 years ago
The followings may help you. I haven't checked whether it works.
$ cd /Users/rafaeldl/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/ruby-oci8-2.1.8/ext/oci8
$ curl -LO https://raw.githubusercontent.com/kubo/ruby-oci8/master/ext/oci8/oraconf.rb # replace with the latest oraconf.rb
$ cd ../..
$ gem build ruby-oci8.gemspec # rebuild ruby-oci8 gem including the latest oraconf.rb
$ mv ruby-oci8-2.1.8.gem ~/
$ cd
$ gem install ./ruby-oci8-2.1.8.gem
I was able to compile GEM, but now it is presenting the following message when I run the application:
oci8.c:696:in oci8lib_210.bundle: ORA-21561: OID generation failed (OCIError)
=> Booting WEBrick
=> Rails 3.2.19 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Warning: NLS_LANG is not set. fallback to US7ASCII.
/Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/bundler/gems/poseidon-55807a56d972/config/initializers/exec_auto.rb:3: warning: already initialized constant EXEC_AUTO
/Users/rafaeldl/Projetos/poseidon_khronos/config/initializers/exec_auto.rb:4: warning: previous definition of EXEC_AUTO was here
Exiting
oci8.c:696:in oci8lib_210.bundle: ORA-21561: OID generation failed (OCIError)
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/ruby-oci8-2.1.8/lib/oci8/oci8.rb:149:in `initialize'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:326:in `new'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:326:in `new_connection'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:436:in `initialize'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:24:in `new'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:24:in `initialize'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_connection.rb:9:in `new'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_connection.rb:9:in `create'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_base_ext.rb:13:in `oracle_enhanced_connection'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/model_schema.rb:224:in `table_exists?'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/attribute_methods/primary_key.rb:75:in `get_primary_key'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/attribute_methods/primary_key.rb:60:in `reset_primary_key'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/attribute_methods/primary_key.rb:49:in `primary_key'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/attribute_assignment.rb:13:in `attributes_protected_by_default'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activemodel-3.2.19/lib/active_model/mass_assignment_security.rb:216:in `block in protected_attributes_configs'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activemodel-3.2.19/lib/active_model/mass_assignment_security.rb:188:in `yield'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activemodel-3.2.19/lib/active_model/mass_assignment_security.rb:188:in `protected_attributes'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activemodel-3.2.19/lib/active_model/mass_assignment_security.rb:118:in `block in attr_protected'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activemodel-3.2.19/lib/active_model/mass_assignment_security.rb:117:in `each'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activemodel-3.2.19/lib/active_model/mass_assignment_security.rb:117:in `attr_protected'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/bundler/gems/poseidon-55807a56d972/lib/poseidon/protheus/base.rb:65:in `set_config'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/bundler/gems/poseidon-55807a56d972/lib/poseidon/protheus/entity_manager.rb:29:in `block in get_class'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/bundler/gems/poseidon-55807a56d972/lib/poseidon/protheus/entity_manager.rb:26:in `class_eval'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/bundler/gems/poseidon-55807a56d972/lib/poseidon/protheus/entity_manager.rb:26:in `get_class'
from /Users/rafaeldl/Projetos/poseidon_khronos/app/models/approval_observer.rb:6:in `<class:ApprovalObserver>'
from /Users/rafaeldl/Projetos/poseidon_khronos/app/models/approval_observer.rb:4:in `<top (required)>'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:469:in `load'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:469:in `block in load_file'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:639:in `new_constants_in'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:468:in `load_file'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:353:in `require_or_load'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:502:in `load_missing_constant'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:192:in `block in const_missing'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:190:in `each'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:190:in `const_missing'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/inflector/methods.rb:230:in `block in constantize'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/inflector/methods.rb:229:in `each'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/inflector/methods.rb:229:in `constantize'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/core_ext/string/inflections.rb:54:in `constantize'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activemodel-3.2.19/lib/active_model/observing.rb:86:in `instantiate_observer'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activemodel-3.2.19/lib/active_model/observing.rb:59:in `block in instantiate_observers'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activemodel-3.2.19/lib/active_model/observing.rb:59:in `each'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activemodel-3.2.19/lib/active_model/observing.rb:59:in `instantiate_observers'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/railtie.rb:123:in `block (2 levels) in <class:Railtie>'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/lazy_load_hooks.rb:26:in `block in on_load'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/lazy_load_hooks.rb:25:in `each'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/lazy_load_hooks.rb:25:in `on_load'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/railtie.rb:122:in `block in <class:Railtie>'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/lazy_load_hooks.rb:34:in `call'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/lazy_load_hooks.rb:42:in `each'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/application/finisher.rb:59:in `block in <module:Finisher>'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/initializable.rb:30:in `run'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/initializable.rb:54:in `each'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/application.rb:136:in `initialize!'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/rafaeldl/Projetos/poseidon_khronos/config/environment.rb:5:in `<top (required)>'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
from /Users/rafaeldl/Projetos/poseidon_khronos/config.ru:3:in `block in <main>'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rack-1.4.7/lib/rack/builder.rb:51:in `instance_eval'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rack-1.4.7/lib/rack/builder.rb:51:in `initialize'
from /Users/rafaeldl/Projetos/poseidon_khronos/config.ru:in `new'
from /Users/rafaeldl/Projetos/poseidon_khronos/config.ru:in `<main>'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rack-1.4.7/lib/rack/builder.rb:40:in `eval'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rack-1.4.7/lib/rack/builder.rb:40:in `parse_file'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rack-1.4.7/lib/rack/server.rb:200:in `app'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/commands/server.rb:46:in `app'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rack-1.4.7/lib/rack/server.rb:304:in `wrapped_app'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rack-1.4.7/lib/rack/server.rb:254:in `start'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/commands/server.rb:70:in `start'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/commands.rb:50:in `tap'
from /Users/rafaeldl/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-3.2.19/lib/rails/commands.rb:50:in `<top (required)>'
from /Users/rafaeldl/Projetos/poseidon_khronos/script/rails:6:in `require'
from /Users/rafaeldl/Projetos/poseidon_khronos/script/rails:6:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
I found the solution here https://github.com/joeferner/node-oracle/issues/47#issuecomment-38309484
$ echo "127.0.0.1 $(hostname)" | sudo tee -a /etc/hosts
Congratulations on your work building this gem!
Thanks a lot!!
Working!!!
Instantclient instalation ok:
Command:
or...
Error:
Environment:
I've tried this, but it did not work:
can anybody help me?
Thanks.