事象
最近、openFrameworks やら node.js やらにうつつを抜かして、いわゆるマークアップをする機会がなかったのですが、ひさしぶりにcompassを使おうとすると、
/Users/nanashi-gonbei/.rbenv/versions/2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/Users/nanashi-gonbei/.rbenv/versions/2.2.2/lib/ruby/2.2.0/x86_64-darwin14/digest/sha1.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (LoadError)
と。動かなくなってました。
一旦compassを入れなおそうと、
gem uninstall compass
を叩いてもエラー。
gem update --system
で、gemをアップデートしようとしても、
ERROR: Loading command: update (LoadError) dlopen(/Users/nanashi-gonbei/.rbenv/versions/2.2.2/lib/ruby/2.2.0/x86_64-darwin14/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib Referenced from: /Users/nanashi-gonbei/.rbenv/versions/2.2.2/lib/ruby/2.2.0/x86_64-darwin14/openssl.bundle Reason: image not found - /Users/nanashi-gonbei/.rbenv/versions/2.2.2/lib/ruby/2.2.0/x86_64-darwin14/openssl.bundle ERROR: While executing gem ... (NoMethodError) undefined method `invoke_with_build_args' for nil:NilClass KYCNT1512-01:_src nanashi-gonbei$ rbenv rbenv 1.0.0-19-g29b4da7 Usage: rbenv <command> [<args>] Some useful rbenv commands are: commands List all available rbenv commands local Set or show the local application-specific Ruby version global Set or show the global Ruby version shell Set or show the shell-specific Ruby version install Install a Ruby version using ruby-build uninstall Uninstall a specific Ruby version rehash Rehash rbenv shims (run this after installing executables) version Show the current Ruby version and its origin versions List all Ruby versions available to rbenv which Display the full path to an executable whence List all Ruby versions that contain the given executable
とエラーになって困っておりました。
解決策
とうやらopensslの調子が悪いようで、
- brew をつかって openssl をインストール
- rubyを入れなおす
- gemのアップデート
- compassを入れなおす
で解決しました。
brew install openssl brew link openssl --force rbenv uninstall 2.2.2 rbenv install 2.2.2 gem update --system gem uninstall compass gem install compass