我有一個rails應用程序,我在安裝寶石,它工作正常。 現在,我不知道我做了什麼,當我在Gemfile中添加一個gem並運行bundle安裝時,該應用程序崩潰時找不到Gem錯誤(例如:「我們很抱歉,但出錯了。 。無法在任何來源(Bundler :: GemNotFound)中找到gmaps4rails-2.1.2 ...「)。Rails寶石路徑錯誤
我試着命令: 其中寶石gmaps4rails 輸出:在/ usr/bin中/寶石
客運錯誤顯示: 系統信息
Ruby interpreter command
/home/webmaster/.rbenv/versions/2.3.3/bin/ruby
User and groups
uid=1001(webmaster) gid=33(www-data) groups=33(www-data),27(sudo),110(lxd)
Environment variables
APACHE_RUN_DIR = /var/run/apache2
APACHE_PID_FILE = /var/run/apache2/apache2.pid
PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
APACHE_LOCK_DIR = /var/lock/apache2
LANG = C
APACHE_RUN_USER = www-data
APACHE_RUN_GROUP = www-data
APACHE_LOG_DIR = /var/log/apache2
PWD = /var/www/maus_view
PASSENGER_USE_FEEDBACK_FD = true
SERVER_SOFTWARE = Apache/2.4.18 (Ubuntu) Phusion_Passenger/5.1.5
PASSENGER_DEBUG_DIR = /tmp/passenger.spawn-debug.XXXXIfqFGX
USER = webmaster
LOGNAME = webmaster
SHELL =
HOME = /home/webmaster
IN_PASSENGER = 1
PYTHONUNBUFFERED = 1
NODE_PATH = /usr/share/passenger/node
RAILS_ENV = development
RACK_ENV = development
WSGI_ENV = development
NODE_ENV = development
PASSENGER_APP_ENV = development
BUNDLER_ORIG_PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
GEM_PATH = /home/webmaster/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0:/home/webmaster/.gem/ruby/2.3.0
GEM_HOME = /home/webmaster/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0
我已經讀了很多計算器的帖子,但我無法調試並找到解決此問題的方法。
有人可以幫我嗎?
謝謝
---編輯---
這是我的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.0.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.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# 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
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '~> 3.0.5'
# 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]
gem 'devise'
#gem 'gmaps4rails'
你可以發佈你的Gemfile內容,它可能有幫助嗎?我試過 「gem install gmaps4rails」,但是我有一個錯誤: 「錯誤:執行gem時...(Errno: – Sanjiv
)你試過運行'gem install gmaps4rails' –