简体   繁体   English

红宝石鞋oci8连接问题

[英]ruby shoes oci8 connect issue

sorry for my english. 对不起我的英语不好。

I am interested about ruby shoes gui development, but on my experiments I didn't get to connect to oracle database, I have created a file with a code like this: 我对ruby shoes gui开发感兴趣,但是在我的实验中,我没有连接到oracle数据库,我创建了一个文件,其代码如下:

require 'oci8'
conn = OCI8.new("irodriguez", "irodriguez", "desa")

so, when I execute from console: 因此,当我从控制台执行时:

$ ruby oci8.rb

all ok, but when I run: 一切正常,但是当我运行时:

$ .shoes/dist/shoes oci8.rb

I get uninitialized constant Object::OCI8 error 我得到uninitialized constant Object::OCI8 error

Some help? 一些帮助?

You have to let Shoes know that it needs to pull in those gems. 您必须让Shoes知道它需要拉那些宝石。 Do the following to make it work. 请执行以下操作使其生效。

Shoes.setup do
  gem 'oci8'
end

require 'oci8'
conn = OCI8.new("irodriguez", "irodriguez", "desa")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM