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

dotenv-rails 2.1.0 でエラー #1155

Closed
1 task done
masao opened this issue Apr 23, 2016 · 5 comments
Closed
1 task done

dotenv-rails 2.1.0 でエラー #1155

masao opened this issue Apr 23, 2016 · 5 comments

Comments

@masao
Copy link
Member

masao commented Apr 23, 2016

  • マニュアル修正が必要ないことを確認

1.1系、1.2系双方でおきるエラー。
enju_leaf起動時にエラーになって起動しない。要修正。

@masao masao added this to the 1.1.3 milestone Apr 23, 2016
@nabeta
Copy link
Member

nabeta commented Apr 23, 2016

まだ原因はよくわかりませんが、現象は手元の環境でも確認しました。回避策として、Gemfileでdotenv-railsのある行を以下のように変更してください。

gem 'dotenv-rails', '~> 2.0.2'

@nabeta nabeta modified the milestones: 1.1.3, 1.1.4 Jul 30, 2016
@masao
Copy link
Member Author

masao commented Jul 30, 2016

手元では同様のエラーが再現しなくなっている。

    dotenv (2.1.1)
    dotenv-rails (2.1.1)

@nabeta
Copy link
Member

nabeta commented Jul 30, 2016

私の環境やデモサーバでも再現しなくなりました。原因がよくわからないのは気持ち悪いですが、仮想マシンの作成スクリプトで再現しなければcloseしましょう。

@nabeta
Copy link
Member

nabeta commented Jul 30, 2016

デモサーバで再現しました。サーバを再起動後に、 /var/log/upstart/enju_leaf-web-1.log に以下のエラーが出ます。

I, [2016-07-30T17:12:13.150945 #1854]  INFO -- : Refreshing Gem list
/var/lib/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:89:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'dotenv-rails'. (Bundler::GemRequireError)
Gem Load Error is: couldn't find HOME environment -- expanding `~'
Backtrace for gem load error is:
/home/kosuke/enju_leaf_11/vendor/bundle/ruby/2.2.0/gems/spring-1.7.2/lib/spring/commands.rb:28:in `expand_path'
/home/kosuke/enju_leaf_11/vendor/bundle/ruby/2.2.0/gems/spring-1.7.2/lib/spring/commands.rb:28:in `<module:Spring>'
/home/kosuke/enju_leaf_11/vendor/bundle/ruby/2.2.0/gems/spring-1.7.2/lib/spring/commands.rb:4:in `<top (required)>'

Gemfileからspringを削除すると問題が発生しなくなりました。
https://github.com/rails/spring

ただ、springはrails newをしたときに含まれるので、dotenv-railsを2.0.2に固定するのでよいと思います。

@masao masao added the checking label Jul 30, 2016
@nabeta
Copy link
Member

nabeta commented Aug 20, 2016

2.0.2に固定して回避する方法でひとまずcloseします。

@nabeta nabeta closed this as completed Aug 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants