環境
- RUby 2.4.0
- Rails 5.1.2
- Docker
###前提・実現したいこと
rails5でAPIを作っているのですが、grape-jbuilder
を入れるとなぜか、rails serverが起動しません
###発生している問題・エラーメッセージ
/usr/local/bundle/gems/grape-jbuilder-0.2.0/lib/grape/jbuilder.rb:2:in `require': cannot load such file -- hashie/hash (LoadError) from /usr/local/bundle/gems/grape-jbuilder-0.2.0/lib/grape/jbuilder.rb:2:in `<top (required)>' from /usr/local/bundle/gems/bundler-1.15.3/lib/bundler/runtime.rb:96:in `require' from /usr/local/bundle/gems/bundler-1.15.3/lib/bundler/runtime.rb:96:in `rescue in block in require' from /usr/local/bundle/gems/bundler-1.15.3/lib/bundler/runtime.rb:73:in `block in require' from /usr/local/bundle/gems/bundler-1.15.3/lib/bundler/runtime.rb:66:in `each' from /usr/local/bundle/gems/bundler-1.15.3/lib/bundler/runtime.rb:66:in `require' from /usr/local/bundle/gems/bundler-1.15.3/lib/bundler.rb:108:in `require' from /myapp/config/application.rb:7:in `<top (required)>' from /usr/local/bundle/gems/railties-5.1.2/lib/rails/commands/server/server_command.rb:129:in `require' from /usr/local/bundle/gems/railties-5.1.2/lib/rails/commands/server/server_command.rb:129:in `block in perform' from /usr/local/bundle/gems/railties-5.1.2/lib/rails/commands/server/server_command.rb:126:in `tap' from /usr/local/bundle/gems/railties-5.1.2/lib/rails/commands/server/server_command.rb:126:in `perform' from /usr/local/bundle/gems/thor-0.19.4/lib/thor/command.rb:27:in `run' from /usr/local/bundle/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command' from /usr/local/bundle/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch' from /usr/local/bundle/gems/railties-5.1.2/lib/rails/command/base.rb:63:in `perform' from /usr/local/bundle/gems/railties-5.1.2/lib/rails/command.rb:44:in `invoke' from /usr/local/bundle/gems/railties-5.1.2/lib/rails/commands.rb:16:in `<top (required)>' from /myapp/bin/rails:9:in `require' from /myapp/bin/rails:9:in `<top (required)>' from /usr/local/bundle/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load' from /usr/local/bundle/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call' from /usr/local/bundle/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call' from /usr/local/bundle/gems/spring-2.0.2/lib/spring/client.rb:30:in `run' from /usr/local/bundle/gems/spring-2.0.2/bin/spring:49:in `<top (required)>' from /usr/local/bundle/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load' from /usr/local/bundle/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>' from /myapp/bin/spring:15:in `require' from /myapp/bin/spring:15:in `<top (required)>' from bin/rails:3:in `load' from bin/rails:3:in `<main>'
ログにはこのように出ていて、Gemfile以外は特に編集していません。
Gemfileは以下
source 'https://rubygems.org' git_source(:github) do |repo_name| repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") "https://github.com/#{repo_name}.git" end # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.1.2' # Use mysql as the database for Active Record gem 'mysql2', '>= 0.3.18', '< 0.5' # Use Puma as the app server gem 'puma', '~> 3.7' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder # gem 'jbuilder', '~> 2.5' # Use Redis adapter to run Action Cable in production # gem 'redis', '~> 3.0' # Use ActiveModel has_secure_password # gem 'bcrypt', '~> 3.1.7' # Use Capistrano for deployment # gem 'capistrano-rails', group: :development # Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible # gem 'rack-cors' gem 'jbuilder' gem 'grape' gem 'grape-jbuilder' gem 'hashie' group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] gem 'hirb' gem 'hirb-unicode' end group :development do gem 'listen', '>= 3.0.5', '< 3.2' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' gem 'spring-watcher-listen', '~> 2.0.0' end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
検索をしてもあまりめぼしいものが見当たらずご教授いただければと思います
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/08/03 07:22