Rails 5.0.0.beta3 'rails-api'。 (捆绑器:: GemRequireError)
Rails 5.0.0.beta3 'rails-api'. (Bundler::GemRequireError)
我正在尝试在 Rails beta3 上测试我的应用程序。当我尝试 运行 rails 服务器上的应用程序时,出现以下错误(使用堆栈跟踪)
/home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'rails-api'. (Bundler::GemRequireError)
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from /home/sambhav/caroobi/caroobi/config/application.rb:7:in `<top (required)>'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands/commands_tasks.rb:88:in `require'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands/commands_tasks.rb:88:in `block in server'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands/commands_tasks.rb:85:in `tap'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands/commands_tasks.rb:85:in `server'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/command.rb:20:in `run'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands.rb:18:in `<top (required)>'
from /home/sambhav/caroobi/caroobi/bin/rails:9:in `require'
from /home/sambhav/caroobi/caroobi/bin/rails:9:in `<top (required)>'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `load'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `call'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/client/command.rb:7:in `call'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/client.rb:28:in `run'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/bin/spring:49:in `<top (required)>'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/binstub.rb:11:in `load'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/sambhav/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/sambhav/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/sambhav/caroobi/caroobi/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
宝石文件
source 'https://rubygems.org'
gem 'rails', github: "rails/rails"
gem 'sass-rails', '~> 5.0'
gem 'mysql2', '0.3.18'
gem 'uglifier', '>= 1.3.0'
gem 'geoip', '1.4.0'
gem 'sanitize', '3.0.0'
gem 'i18n-js', '2.1.2'
gem 'bootstrap-sass', '3.2.0.1' # Bootstrap in SCSS
gem 'exception_notification', '4.0.1'
gem 'rake', '10.3.2'
gem 'newrelic_rpm', '~> 3.14', '>= 3.14.2.312'
gem 'active_model_serializers', '0.9.4'
gem 'rails-api', '0.4.0'
gem 'prerender_rails'
gem 'i18n-docs'
group :development, :test do
gem 'pry'
gem 'spring'
gem 'annotator', require: false
gem 'letter_opener'
gem 'rspec-rails'
gem 'rack-cors'
gem 'sqlite3'
end
注意:我已经按照一些帖子的建议安装了 NodeJS。
Ruby版本:2.3.0
还有什么我可以尝试的吗?
如果您使用的是 Rails 5,请不要包含 gem rails-api(已包含在 Rails 5 中).
我正在尝试在 Rails beta3 上测试我的应用程序。当我尝试 运行 rails 服务器上的应用程序时,出现以下错误(使用堆栈跟踪)
/home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'rails-api'. (Bundler::GemRequireError)
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from /home/sambhav/caroobi/caroobi/config/application.rb:7:in `<top (required)>'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands/commands_tasks.rb:88:in `require'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands/commands_tasks.rb:88:in `block in server'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands/commands_tasks.rb:85:in `tap'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands/commands_tasks.rb:85:in `server'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/command.rb:20:in `run'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands.rb:18:in `<top (required)>'
from /home/sambhav/caroobi/caroobi/bin/rails:9:in `require'
from /home/sambhav/caroobi/caroobi/bin/rails:9:in `<top (required)>'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `load'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `call'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/client/command.rb:7:in `call'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/client.rb:28:in `run'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/bin/spring:49:in `<top (required)>'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/binstub.rb:11:in `load'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/sambhav/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/sambhav/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/sambhav/caroobi/caroobi/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
宝石文件
source 'https://rubygems.org'
gem 'rails', github: "rails/rails"
gem 'sass-rails', '~> 5.0'
gem 'mysql2', '0.3.18'
gem 'uglifier', '>= 1.3.0'
gem 'geoip', '1.4.0'
gem 'sanitize', '3.0.0'
gem 'i18n-js', '2.1.2'
gem 'bootstrap-sass', '3.2.0.1' # Bootstrap in SCSS
gem 'exception_notification', '4.0.1'
gem 'rake', '10.3.2'
gem 'newrelic_rpm', '~> 3.14', '>= 3.14.2.312'
gem 'active_model_serializers', '0.9.4'
gem 'rails-api', '0.4.0'
gem 'prerender_rails'
gem 'i18n-docs'
group :development, :test do
gem 'pry'
gem 'spring'
gem 'annotator', require: false
gem 'letter_opener'
gem 'rspec-rails'
gem 'rack-cors'
gem 'sqlite3'
end
注意:我已经按照一些帖子的建议安装了 NodeJS。 Ruby版本:2.3.0
还有什么我可以尝试的吗?
如果您使用的是 Rails 5,请不要包含 gem rails-api(已包含在 Rails 5 中).