繁体   English   中英

Rails gem路径错误

[英]Rails gem path error

我在安装gem的地方有一个Rails应用程序,它运行良好。 现在,我不知道自己做了什么,当我在Gemfile中添加gem并运行bundle install时,应用程序崩溃并显示Gem not found错误(例如:“我们很抱歉,但是出了点问题。...在任何来源(Bundler :: GemNotFound)...“中找不到gmaps4rails-2.1.2。

我尝试了命令:哪个gem gmaps4rails输出:/ usr / bin / gem

乘客错误显示:系统信息

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

我已经阅读了很多stackoverflow的文章,但无法调试并找到解决此问题的方法。

有人可以帮我吗?

谢谢

-编辑-

这是我的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'

对于某些gem,您需要通过命令行安装它们,而不仅仅是“捆绑安装”它们。 因此,请尝试运行:

gem install gmaps4rails

然后转到您的项目目录,然后单击bundle install

希望能帮助到你!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM