Bug 1121002
Summary: | [origin_cartridge_229]Failed to access mysql via DB driver for ruby-2.0 app | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | OpenShift Online | Reporter: | Lei Zhang <lzhang> | ||||||
Component: | Image | Assignee: | Michal Fojtik <mfojtik> | ||||||
Status: | CLOSED UPSTREAM | QA Contact: | libra bugs <libra-bugs> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 2.x | CC: | jokerman, mfojtik, mmccomas, tdawson, xtian | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2014-07-21 14:37:13 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Lei Zhang
2014-07-18 06:21:07 UTC
Created attachment 918975 [details]
config.ru
Created attachment 918976 [details]
mysql_factory.rb
Lei, try to use the 'mysql2' gem instead of 'mysql', but I'm going to reproduce it on devenv. Hi Michal, I updated require 'mysql2'" into the mysql_factory.rb file and "gem install mysql2 in the app, when access mysql via curl after restart, failed to access it. [lijun@ray shcknafm]$ head -n 3 mysql_factory.rb #!/usr/bin/env ruby require 'mysql2' [lijun@ray shcknafm]$ rhc app ssh shcknafm "gem list mysql" mysql2 (0.3.16) [lijun@ray shcknafm]$ curl http://shcknafm-retokl.dev.rhcloud.com/mysql uninitialized constant MySQL::Mysql But, if I used require 'mysql'" in the mysql_factory.rb file and "gem install mysql in the app, when access mysql via curl after restart the app, can access it. [lijun@ray shcknafm]$ head -n 3 mysql_factory.rb #!/usr/bin/env ruby require 'mysql' [lijun@ray shcknafm]$ rhc app ssh shcknafm "gem list mysql" mysql (2.9.1) [lijun@ray shcknafm]$ curl http://shcknafm-retokl.dev.rhcloud.com/mysql version 1 Lei: OK I figured out now, that this is a missing RPM problem. We don't have mysql2/mysql rpms for the ruby20 so for that you have to install them manually. But we think that 99% of our users will use Bundler and put them into Gemfile (so they will install those manually, via bunder). I'm tempted to close this as a WONTFIX, but I contacted Troy to see how much effort it will be to add those RPMS. Info provided offline. Removing needinfo. |