I'm trying to update my old project to new rails version and I have this error when I'm trying to run it as debug in local
As you can see above I'm using Windows. The project now have the ruby version ruby-2.4.4-p296
I tried to reinstall the gem and run bundle install / update but it doesn't work...
Any help is appreciated. Thanks in advance
Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails'
# Use postgresql as the database for Active Record
gem 'pg', '0.20.0'
gem 'bootstrap-sass', '~> 3.3.7'
gem 'font-awesome-rails', '4.7.0.1'
#gem 'puma'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0.4'
gem 'simple_form'
#https://github.com/mileszs/wicked_pdf
gem 'wicked_pdf'
gem 'newrelic_rpm'
gem 'wkhtmltopdf-heroku'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
gem 'nokogiri', '~> 1.8.2'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
#gem install rdoc -v '6.0.4'gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Fast Debugger (ruby-debug-ide 0.6.1.beta2, debase 0.2.2, file filtering is supported) listens on 0.0.0.0:3970
Uncaught exception: There was an error while trying to load the gem 'pg'.
Gem Load Error is: undefined method `add_dll_directory' for RubyInstaller:Module
Backtrace for gem load error is:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/pg-0.20.0-x64-mingw32/lib/pg.rb:14:in `block in <top (required)>'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/pg-0.20.0-x64-mingw32/lib/pg.rb:24:in `rescue in <top (required)>'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/pg-0.20.0-x64-mingw32/lib/pg.rb:3:in `<top (required)>'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.17.0.pre.1/lib/bundler/runtime.rb:81:in `require'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.17.0.pre.1/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.17.0.pre.1/lib/bundler/runtime.rb:76:in `each'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.17.0.pre.1/lib/bundler/runtime.rb:76:in `block in require'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.17.0.pre.1/lib/bundler/runtime.rb:65:in `each'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.17.0.pre.1/lib/bundler/runtime.rb:65:in `require'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.17.0.pre.1/lib/bundler.rb:114:in `require'
C:/Users/Adrian/RubymineProjects/peluqueria-inspinia/config/application.rb:7:in `<top (required)>'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:78:in `require'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:78:in `block in server'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:75:in `tap'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:75:in `server'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands.rb:17:in `<top (required)>'
C:/Users/Adrian/RubymineProjects/peluqueria-inspinia/bin/rails:4:in `require'
C:/Users/Adrian/RubymineProjects/peluqueria-inspinia/bin/rails:4:in `<top (required)>'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ruby-debug-ide-0.6.1.beta2/lib/ruby-debug-ide.rb:88:in `debug_load'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ruby-debug-ide-0.6.1.beta2/lib/ruby-debug-ide.rb:88:in `debug_program'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ruby-debug-ide-0.6.1.beta2/bin/rdebug-ide:130:in `<top (required)>' -e:1:in `load'-e:1:in `<main>'
Bundler Error Backtrace:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.17.0.pre.1/lib/bundler/runtime.rb:84:in `rescue in block (2 levels) in require'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.17.0.pre.1/lib/bundler/runtime.rb:80:in `block (2 levels) in require'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.17.0.pre.1/lib/bundler/runtime.rb:76:in `each'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.17.0.pre.1/lib/bundler/runtime.rb:76:in `block in require'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.17.0.pre.1/lib/bundler/runtime.rb:65:in `each'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.17.0.pre.1/lib/bundler/runtime.rb:65:in `require'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.17.0.pre.1/lib/bundler.rb:114:in `require'
C:/Users/Adrian/RubymineProjects/peluqueria-inspinia/config/application.rb:7:in `<top (required)>'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:78:in `require'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:78:in `block in server'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:75:in `tap'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:75:in `server'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands.rb:17:in `<top (required)>'
C:/Users/Adrian/RubymineProjects/peluqueria-inspinia/bin/rails:4:in `require'
C:/Users/Adrian/RubymineProjects/peluqueria-inspinia/bin/rails:4:in `<top (required)>'
Process finished with exit code 0
I think the problem is the version of the gem 'pg' but I don't know what version I should put
pg-0.20.0 is not compatible with more recent RubyInstaller versions. You'll have to update to at least pg-0.21.0. Probably it's best to remove the version requirement for pg in the Gemfile, so that it's updated to the latest compatible version on bundler update. See also the pg changelog.
Related
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:68: warning: already initialized constant Win32::WCHAR
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:68: warning: previous definition of WCHAR was here
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:69: warning: already initialized constant Win32::WCHAR_NUL
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:69: warning: previous definition of WCHAR_NUL was here
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:70: warning: already initialized constant Win32::WCHAR_CR
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:70: warning: previous definition of WCHAR_CR was here
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:71: warning: already initialized constant Win32::WCHAR_SIZE
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:71: warning: previous definition of WCHAR_SIZE was here
I ran the command C:/RailsInstaller/Ruby2.3.3/bin/bundle update
Backtrace:
ArgumentError: unknown encoding name - CP720
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:72:in `find'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:72:in `<module:Win32>'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/registry.rb:4:in `<top (required)>'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/win32/resolv.rb:7:in `<top (required)>'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/resolv.rb:172:in `<class:Hosts>'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/resolv.rb:169:in `<class:Resolv>'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/resolv.rb:39:in `<top (required)>'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/remote_fetcher.rb:7:in `<top (required)>'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/spec_fetcher.rb:2:in `<top (required)>'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/dependency_installer.rb:6:in `<top (required)>'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/installer.rb:3:in `<top (required)>'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/cli/update.rb:50:in `run'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/cli.rb:231:in `update'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/cli.rb:22:in `dispatch'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/cli.rb:13:in `start'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/exe/bundle:30:in `block in <top (required)>'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/exe/bundle:22:in `<top (required)>'
C:/RailsInstaller/Ruby2.3.3/bin/bundle:22:in `load'
C:/RailsInstaller/Ruby2.3.3/bin/bundle:22:in `<main>'
Environment
Bundler 1.15.3
Rubygems 2.5.2
Ruby 2.3.3p222 (2016-11-21 revision 56859) [i386-mingw32]
GEM_HOME C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0
GEM_PATH C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0;C:/Users/User/.gem/ruby/2.3.0
Git 2.28.0.windows.1
Platform x86-mingw32
OpenSSL OpenSSL 1.0.2j 26 Sep 2016
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.3'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# 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', platforms: [:mri, :mingw, :x64_mingw]
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '~> 2.13'
gem 'selenium-webdriver'
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'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
I've never ran into this problem but it seems like this is related to your terminal's codepage.
Running the command chcp 1252 through your terminal should fix this issue. Let me note that this will not change the Codepage globally for all your terminals, it's only for the current one. Please refer to this post for more info.
So I'm having issues with creating users with Devise.
It's an issue with "bcrypt".
Here is the error that's being generated
I looked at a few similar threads here and the solution was to install the bcrypt gem for Ruby.
And so I went to rubygems.org and added the line in gem file then ran bundle install.
However, after that I try to run the server but it fails for some reason. Server won't start. Here is the error I received in GitBash:
Zak#ZAKARIA ~/Desktop/Work/raddit (add_users)
$ rails s
c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/dependen
cies.rb:293:in `require': cannot load such file -- bcrypt_ext (LoadError)
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_sup
port/dependencies.rb:293:in `block in require'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_sup
port/dependencies.rb:259:in `load_dependency'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_sup
port/dependencies.rb:293:in `require'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcry
pt.rb:16:in `rescue in <top (required)>'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcry
pt.rb:12:in `<top (required)>'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime
.rb:91:in `require'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime
.rb:91:in `block (2 levels) in require'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime
.rb:86:in `each'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime
.rb:86:in `block in require'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime
.rb:75:in `each'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime
.rb:75:in `require'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler.rb:106:
in `require'
from c:/Users/Zak/Desktop/Work/raddit/config/application.rb:7:in `<top (required)>'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/
commands_tasks.rb:88:in `require'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/
commands_tasks.rb:88:in `block in server'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/
commands_tasks.rb:85:in `tap'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/
commands_tasks.rb:85:in `server'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/
commands_tasks.rb:49:in `run_command!'
from c:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands.
rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
NOTE: Before adding the gem, the server would run just fine.
Also here is my gem file
gem 'rails', '~> 5.0.2'
gem 'sqlite3'
gem 'puma', '~> 3.0'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.2'
gem 'devise', '~> 4.2', '>= 4.2.1'
gem 'jquery-rails'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'bcrypt', '~> 3.1', '>= 3.1.11'
group :development, :test do
gem 'byebug', platform: :mri
end
group :development do
gem 'web-console', '>= 3.3.0'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
I don't think you need to set the explicitly bcrypt in your Gemfile. Devise already includes bcrypt as a runtime dependency. Try to remove the bcrypt gem from your Gemfile, run bundle update and the restart your server. That worked for me.
Based on ajeferson's asnwer.
This thread has the solution: github.com/codahale/bcrypt-ruby/issues/142
I had the same issue, and for me, whenever I run bundle install, it installs two versions of bcrypt:
bcrypt-3.1.11
bcrypt-3.1.11-x86-mingw32
Therefore, If I just executed "gem uninstall bcrypt" and deleted the (2), then it worked fine.
To make sure it will not be installed again, I specify the platform on my Gemfile, like this:
gem 'bcrypt', platform: :ruby
Im trying to setup shoppe according to their manual at: tryshoppe.com
Therefor I am using Rails 4.0.1 with ruby 2.0.0p643 on rvm.
On the gerenation of shoppe:setup, or just 'rails c' I get following error:
/usr/local/rvm/gems/ruby-2.0.0-p643/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 'shoppe'. (Bundler::GemRequireError)
from /usr/local/rvm/gems/ruby-2.0.0-p643/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /usr/local/rvm/gems/ruby-2.0.0-p643/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from /usr/local/rvm/gems/ruby-2.0.0-p643/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from /usr/local/rvm/gems/ruby-2.0.0-p643/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from /usr/local/rvm/gems/ruby-2.0.0-p643/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from /usr/local/rvm/gems/ruby-2.0.0-p643/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from /tmp/foo/config/application.rb:7:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.1/lib/rails/commands.rb:60:in `require'
from /usr/local/rvm/gems/ruby-2.0.0-p643/gems/railties-4.0.1/lib/rails/commands.rb:60:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I don't get it. I've although tried this with ruby 2.2 and newer rails, leading to the same error.
This is the Gemfile:
source 'https://rubygems.org'
gem 'shoppe'
gem 'rails', '4.0.1'
gem 'sqlite3'
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
group :doc do
gem 'sdoc', require: false
end
If you use the latest pre-release or release candidate version for Bundler (via gem install bundler --pre), it should have this change in it: https://github.com/bundler/bundler/pull/4187
This change should allow you to see the original error context instead of just the generic, unhelpful Bundler::GemRequireError.
No matter what I try to do it won't work. Here is my current console code.
All I know is that it has something to do with sass-rails.
I really am looking out for some help here. I understand the GEM cannot be found however, how do I make it so it can be loaded.
/usr/local/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 'sass-rails'. (Bundler::GemRequireError)
from /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from /usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from /home/ubuntu/workspace/config/application.rb:7:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:78:in `require'
from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `server'
from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>'
from /home/ubuntu/workspace/bin/rails:9:in `require'
from /home/ubuntu/workspace/bin/rails:9:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.3.0/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `load'
from /usr/local/rvm/gems/ruby-2.3.0/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `call'
from /usr/local/rvm/gems/ruby-2.3.0/gems/spring-1.6.4/lib/spring/client/command.rb:7:in `call'
from /usr/local/rvm/gems/ruby-2.3.0/gems/spring-1.6.4/lib/spring/client.rb:28:in `run'
from /usr/local/rvm/gems/ruby-2.3.0/gems/spring-1.6.4/bin/spring:49:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.3.0/gems/spring-1.6.4/lib/spring/binstub.rb:11:in `load'
from /usr/local/rvm/gems/ruby-2.3.0/gems/spring-1.6.4/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/ubuntu/workspace/bin/spring:13:in `require'
from /home/ubuntu/workspace/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>
And my GEM file
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.6'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', group: [:development, :test]
# Use postgresql as the database for production
group :production do
gem 'pg'
gem 'rails_12factor'
end
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.1.0'
# 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 following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '0.4.0', group: :doc
# Use ActiveModel has_secure_password
# gem 'bcrypt', '3.1.7'
# Use Unicorn as the app server
# gem 'unicorn'
# 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'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
try to install nodejs first.
sudo apt-get install nodejs
The run
bundle install
I'm getting the following error after trying to add jasmine to my rails 4 project
rails g jasmine:install
/Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/util.rb:1132:in `module_function': undefined method `singleton_class?' for module `Sass::Util' (NameError)
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/util.rb:1132:in `block in <module:Util>'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/util.rb:1132:in `each'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/util.rb:1132:in `<module:Util>'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/util.rb:14:in `<module:Sass>'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/util.rb:12:in `<top (required)>'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass/version.rb:2:in `<top (required)>'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/sass-3.3.0.rc.2/lib/sass.rb:9:in `<top (required)>'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/bootstrap-sass-3.0.3.0/lib/bootstrap-sass/sass_functions.rb:1:in `<top (required)>'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/bootstrap-sass-3.0.3.0/lib/bootstrap-sass.rb:7:in `load!'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/bootstrap-sass-3.0.3.0/lib/bootstrap-sass.rb:76:in `<top (required)>'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:76:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:72:in `each'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:72:in `block in require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:61:in `each'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.5.1/lib/bundler/runtime.rb:61:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.5.1/lib/bundler.rb:131:in `require'
from config/application.rb:7:in `<top (required)>'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/railties-4.0.0/lib/rails/commands.rb:44:in `require'
from /Users/harrymoreno/.rvm/gems/ruby-2.1.0/gems/railties-4.0.0/lib/rails/commands.rb:44:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Gemfile
source 'https://rubygems.org'
ruby '2.1.0'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'
# Use sqlite3 as the database for Active Record
#gem 'sqlite3'
gem 'pg'
gem 'devise'
gem 'font-awesome-rails'
gem 'bootstrap-sass', '~> 3.0.3.0'
gem 'simple_form', git: 'https://github.com/plataformatec/simple_form.git'
gem 'carrierwave'
gem 'fog', '~> 1.3.1'
gem 'mini_magick'
gem 'rails_12factor'
gem 'friendly_id', '~> 5.0.0'
gem 'feedzirra'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
gem 'bourbon'
group :development do
gem 'sass-rails-source-maps'
end
group :development, :test do
gem 'jasmine'
end
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails', '~> 3.0'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
# gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
any ideas on what the problem might be?
The solution is to specify the latest version of sass in your gemfile
gem 'sass', git: 'https://github.com/nex3/sass.git'
the issue was solved just 17 days ago here https://github.com/nex3/sass/issues/1057?source=cc