{"issue":{"state":"closed","created_at":"2011-12-11T16:11:10Z","updated_at":"2011-12-11T17:05:49Z","comments":1,"user":{"gravatar_id":"a8c1e1fc23835324d400ef9acfc5d14b","id":158845,"url":"https://api.github.com/users/leucos","avatar_url":"https://secure.gravatar.com/avatar/a8c1e1fc23835324d400ef9acfc5d14b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"leucos"},"body":"Hello,\r\n\r\n# Word or warning\r\n\r\nFirst, I'm not sure this is a Sequel related issue, but subsequent (admitively poor) tests seems to suggest so.\r\nIf not, forgive me for the noise.\r\nI tried to make reader's life as easy as possible, trying to include only relevant things, but if anymore information/tests/whatever are required, I'd be glad to send some more input. Hopefuly, you might not have to deal with Oracle so it might be uneasy to reproduce at your place.\r\n\r\n# Context\r\n\r\nI'm trying to use Sequel on an Oracle backend to create webservice backed by [Thin]([https://github.com/macournoyer/thin), [Rack](https://github.com/chneukirchen/rack) and [Grape](https://github.com/intridea/grape).\r\n\r\n# The issue\r\n\r\nThings were running pretty well until I tried to use the 'daemonize' feature of Thin, which lets you start *n* detached web processes on different ports.\r\n\r\nI rewrote a simplified example as a Gist (https://gist.github.com/1460919) that includes the code ([init.rb](https://gist.github.com/1460919#file_init.rb)), the rackup file ([config.ru](https://gist.github.com/1460919#file_config.ru)) and the Thin log ([thin.3000.log](https://gist.github.com/1460919#file_thin.3000.log)).\r\n\r\nIn summary : things are always running okay with SQLite as the DB backend. When using Oracle, it works when thin is started undetached with `thin -R config.ru start`, but fails when run daemonized with `thin -R config.ru -s2 start`, yielding the following lovely oracle error :\r\n\r\n    ORA-12154: TNS:could not resolve the connect identifier specified\r\n\r\nI dumped the environment in the log file, to be sure that `ORACLE_HOME` and `LD_LIBRARY_PATH` are fine, and fine they seem.\r\n\r\nI tried to reproduce directly this error without Sequel/Grape and Thin, using the Daemons gem like Thin does (https://github.com/macournoyer/thin/blob/master/lib/thin/daemonizing.rb). I wanted to check if it wasn't related to the oci8 driver, but it seems not (https://gist.github.com/1460919#file_zoradaemontest.rb).\r\n\r\nI tried to make the [Gist](https://gist.github.com/1460919) comprehensive, with all files involved.\r\n\r\nThanks for reading.\r\n\r\nM","assignee":null,"id":2516386,"number":409,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"title":"ORA-12154 with Sequel, Grape and daemonized Thin","html_url":"https://github.com/jeremyevans/sequel/issues/409","closed_at":"2011-12-11T17:05:49Z","url":"https://api.github.com/repos/jeremyevans/sequel/issues/409","milestone":null},"action":"closed"}