{"action":"created","issue":{"url":"https://api.github.com/repos/rspec/rspec-rails/issues/1279","labels_url":"https://api.github.com/repos/rspec/rspec-rails/issues/1279/labels{/name}","comments_url":"https://api.github.com/repos/rspec/rspec-rails/issues/1279/comments","events_url":"https://api.github.com/repos/rspec/rspec-rails/issues/1279/events","html_url":"https://github.com/rspec/rspec-rails/issues/1279","id":54445733,"number":1279,"title":"'no implicit conversion of Hash into String' when creating tmp folder for request specs","user":{"login":"arturictus","id":1930175,"avatar_url":"https://avatars.githubusercontent.com/u/1930175?v=3","gravatar_id":"","url":"https://api.github.com/users/arturictus","html_url":"https://github.com/arturictus","followers_url":"https://api.github.com/users/arturictus/followers","following_url":"https://api.github.com/users/arturictus/following{/other_user}","gists_url":"https://api.github.com/users/arturictus/gists{/gist_id}","starred_url":"https://api.github.com/users/arturictus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arturictus/subscriptions","organizations_url":"https://api.github.com/users/arturictus/orgs","repos_url":"https://api.github.com/users/arturictus/repos","events_url":"https://api.github.com/users/arturictus/events{/privacy}","received_events_url":"https://api.github.com/users/arturictus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-01-15T12:50:57Z","updated_at":"2015-09-25T14:33:39Z","closed_at":"2015-01-15T15:43:16Z","body":"we are having this issue when running request specs, making them all to fail in multiple environments:\r\n- 3 different laptops (Mac, Linux)\r\n- Codeship (Ubuntu)\r\n\r\nIt fails here:\r\n/Users/[user]/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tmpdir.rb:27:in `expand_path'\r\n\r\nWhen I run this code with irb all the ENV variables are strings or nil:\r\n2.1.3 :020 > [ENV['TMPDIR'], ENV['TMP'], ENV['TEMP'], @@systmpdir, '/tmp', '.']\r\n=> [\"/var/folders/nz/qf7zdmgn0hjgcpfcnqbflcyw0000gn/T/\", nil, nil, \"/tmp\", \"/tmp\", \".\"]\r\n\r\nIf I stop the execution when test is running in this line I get hashes\r\n\r\n(byebug) [ENV['TMPDIR'], ENV['TMP'], ENV['TEMP'], @@systmpdir, '/tmp', '.']\r\n[{}, {}, {}, \"/tmp\", \"/tmp\", \".\"]\r\n\r\nLooks like ENV is not properly set.\r\n\r\ngems installed:\r\nrspec (3.0.0)\r\n      rspec-core (~> 3.0.0)\r\n      rspec-expectations (~> 3.0.0)\r\n      rspec-mocks (~> 3.0.0)\r\n    rspec-core (3.0.4)\r\n      rspec-support (~> 3.0.0)\r\n    rspec-expectations (3.0.4)\r\n      diff-lcs (>= 1.2.0, < 2.0)\r\n      rspec-support (~> 3.0.0)\r\n    rspec-mocks (3.0.4)\r\n      rspec-support (~> 3.0.0)\r\n    rspec-rails (3.0.2)\r\n      actionpack (>= 3.0)\r\n      activesupport (>= 3.0)\r\n      railties (>= 3.0)\r\n      rspec-core (~> 3.0.0)\r\n      rspec-expectations (~> 3.0.0)\r\n      rspec-mocks (~> 3.0.0)\r\n      rspec-support (~> 3.0.0)\r\n    rspec-support (3.0.4)\r\nmongoid-rspec (2.0.0.rc1)\r\n\r\nI paste the trace in here:\r\n\r\n TypeError:\r\n       no implicit conversion of Hash into String\r\n     # /Users/arturpanach/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tmpdir.rb:28:in `expand_path'\r\n     # /Users/arturpanach/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tmpdir.rb:28:in `block in tmpdir'\r\n     # /Users/arturpanach/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tmpdir.rb:26:in `each'\r\n     # /Users/arturpanach/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tmpdir.rb:26:in `tmpdir'\r\n     # /Users/arturpanach/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tmpdir.rb:106:in `tmpdir'\r\n     # /Users/arturpanach/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tmpdir.rb:138:in `create'\r\n     # /Users/arturpanach/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tmpdir.rb:86:in `mktmpdir'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/selenium-webdriver-2.43.0/lib/selenium/webdriver/firefox/profile.rb:73:in `layout_on_disk'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/selenium-webdriver-2.43.0/lib/selenium/webdriver/firefox/launcher.rb:58:in `create_profile'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/selenium-webdriver-2.43.0/lib/selenium/webdriver/firefox/launcher.rb:34:in `block in launch'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/selenium-webdriver-2.43.0/lib/selenium/webdriver/firefox/socket_lock.rb:20:in `locked'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/selenium-webdriver-2.43.0/lib/selenium/webdriver/firefox/launcher.rb:32:in `launch'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/selenium-webdriver-2.43.0/lib/selenium/webdriver/firefox/bridge.rb:24:in `initialize'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/selenium-webdriver-2.43.0/lib/selenium/webdriver/common/driver.rb:31:in `new'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/selenium-webdriver-2.43.0/lib/selenium/webdriver/common/driver.rb:31:in `for'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/selenium-webdriver-2.43.0/lib/selenium/webdriver.rb:67:in `for'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/capybara-2.4.4/lib/capybara/selenium/driver.rb:13:in `browser'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/capybara-2.4.4/lib/capybara/selenium/driver.rb:45:in `visit'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/capybara-2.4.4/lib/capybara/session.rb:227:in `visit'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/capybara-2.4.4/lib/capybara/dsl.rb:51:in `block (2 levels) in <module:DSL>'\r\n     # ./spec/support/sign_in_macros.rb:8:in `capybara_sign_in'\r\n     # ./spec/requests/assistant_can_use_as_traveler_spec.rb:9:in `block (3 levels) in <top (required)>'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example.rb:294:in `instance_exec'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example.rb:294:in `instance_exec'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/hooks.rb:349:in `run'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/hooks.rb:410:in `block in run'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/hooks.rb:410:in `each'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/hooks.rb:410:in `run'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/hooks.rb:485:in `run'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example.rb:340:in `run_before_example'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example.rb:147:in `block in run'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example.rb:210:in `call'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example.rb:210:in `block (2 levels) in <class:Procsy>'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-rails-3.0.2/lib/rspec/rails/adapters.rb:72:in `block (2 levels) in <module:MinitestLifecycleAdapter>'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example.rb:294:in `instance_exec'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example.rb:294:in `instance_exec'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/hooks.rb:430:in `block (2 levels) in run'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example.rb:210:in `call'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example.rb:210:in `block (2 levels) in <class:Procsy>'\r\n     # ./spec/rails_helper.rb:39:in `block (3 levels) in <top (required)>'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/database_cleaner-1.3.0/lib/database_cleaner/generic/base.rb:15:in `cleaning'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/database_cleaner-1.3.0/lib/database_cleaner/base.rb:92:in `cleaning'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/database_cleaner-1.3.0/lib/database_cleaner/configuration.rb:86:in `block (2 levels) in cleaning'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/database_cleaner-1.3.0/lib/database_cleaner/configuration.rb:87:in `call'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/database_cleaner-1.3.0/lib/database_cleaner/configuration.rb:87:in `cleaning'\r\n     # ./spec/rails_helper.rb:38:in `block (2 levels) in <top (required)>'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example.rb:294:in `instance_exec'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example.rb:294:in `instance_exec'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/hooks.rb:430:in `block (2 levels) in run'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example.rb:210:in `call'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example.rb:210:in `block (2 levels) in <class:Procsy>'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/hooks.rb:432:in `run'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/hooks.rb:485:in `run'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example.rb:303:in `with_around_example_hooks'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example.rb:145:in `run'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example_group.rb:494:in `block in run_examples'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example_group.rb:490:in `map'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example_group.rb:490:in `run_examples'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example_group.rb:457:in `run'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example_group.rb:458:in `block in run'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example_group.rb:458:in `map'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/example_group.rb:458:in `run'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:112:in `block (2 levels) in run_specs'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:112:in `map'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:112:in `block in run_specs'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/reporter.rb:54:in `report'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:108:in `run_specs'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:86:in `run'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:70:in `run'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:38:in `invoke'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/gems/rspec-core-3.0.4/exe/rspec:4:in `<top (required)>'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/bin/rspec:23:in `load'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/bin/rspec:23:in `<main>'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/bin/ruby_executable_hooks:15:in `eval'\r\n     # /Users/arturpanach/.rvm/gems/ruby-2.1.3@quality/bin/ruby_executable_hooks:15:in `<main>'\r\n"},"comment":{"url":"https://api.github.com/repos/rspec/rspec-rails/issues/comments/143239434","html_url":"https://github.com/rspec/rspec-rails/issues/1279#issuecomment-143239434","issue_url":"https://api.github.com/repos/rspec/rspec-rails/issues/1279","id":143239434,"user":{"login":"arturictus","id":1930175,"avatar_url":"https://avatars.githubusercontent.com/u/1930175?v=3","gravatar_id":"","url":"https://api.github.com/users/arturictus","html_url":"https://github.com/arturictus","followers_url":"https://api.github.com/users/arturictus/followers","following_url":"https://api.github.com/users/arturictus/following{/other_user}","gists_url":"https://api.github.com/users/arturictus/gists{/gist_id}","starred_url":"https://api.github.com/users/arturictus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arturictus/subscriptions","organizations_url":"https://api.github.com/users/arturictus/orgs","repos_url":"https://api.github.com/users/arturictus/repos","events_url":"https://api.github.com/users/arturictus/events{/privacy}","received_events_url":"https://api.github.com/users/arturictus/received_events","type":"User","site_admin":false},"created_at":"2015-09-25T14:33:39Z","updated_at":"2015-09-25T14:33:39Z","body":"@myronmarston \r\nI've done a gem following your advice.\r\nThanks.\r\nhttps://github.com/arturictus/env_test_helpers"}}