Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ruby-oci8 as a runtime dependency #175

Closed
derickgn opened this issue Mar 25, 2019 · 2 comments
Closed

Add ruby-oci8 as a runtime dependency #175

derickgn opened this issue Mar 25, 2019 · 2 comments
Labels

Comments

@derickgn
Copy link

Steps to reproduce

Add the ruby-plsql gem to a project using bundler as the dependency manager.

Expected and actual behavior

After dependencies been solved, the gem should work with no problem, but it require's ruby-oci8 to work.

I looked for it possible causes in the ruby-plsql's gemspec and found that in the following code block, line 93 of gemspec's file, ruby-oci8 is added as a development_dependency, which causes to it not be installed by default and not be activated when ruby-plsql is required.

if Gem::Version.new(Gem::VERSION) >= Gem::Version.new("1.2.0") then
  s.add_development_dependency("juwelier".freeze, ["~> 2.0"])
  s.add_development_dependency("rspec_junit_formatter".freeze, [">= 0"])
  s.add_development_dependency("rake".freeze, [">= 10.0"])
  s.add_development_dependency("rspec".freeze, ["~> 3.1"])
  s.add_development_dependency("activerecord".freeze, ["~> 5.0"])
  s.add_development_dependency("activerecord-oracle_enhanced-adapter".freeze, ["~> 1.7"])
  s.add_development_dependency("simplecov".freeze, [">= 0"])
  s.add_development_dependency("ruby-oci8".freeze, ["~> 2.1"])
else

Since this dependency is needed to the gem properly work, under development or production enviroment, it should be added as a runtime dependency, cause even if I install it using the development option, when the project goes to production I have to manually require ruby-oci8 in the Gemfile.

To solve this issue simply change s.add_development_dependency("ruby-oci8".freeze, ["~> 2.1"]) to s.add_dependency("ruby-oci8".freeze, ["~> 2.1"]) in line 93, which is the if statement that my system in running into.

System configuration

Ruby version: 6.2.0

Oracle Database version: 12.1

@derickgn derickgn changed the title Add ruby-oci8 as a dependency Add ruby-oci8 as a runtime dependency Mar 25, 2019
@yahonda
Copy link
Collaborator

yahonda commented Apr 2, 2019

Thanks for opening a issue.

As ruby-plsql supports both CRuby and JRuby, Users who runs CRuby need to add ruby-oci8 by themselves.

@stale
Copy link

stale bot commented Jun 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 1, 2019
@stale stale bot closed this as completed Jun 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants