I am trying to install the spree store into my rails app, and when I enter spree install in the terminal, I receive the following error:
home/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/specification.rb:2158:in method_missing': undefined method this' for #<Gem::Specification:0x5c7150 activesupport-4.2.5.1> (NoMethodError)
My gemfile looks like this:
source 'https://rubygems.org'
gem 'rails', '4.2.5.1'
gem 'pg', '~> 0.15'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :test do
debugger console
gem 'byebug'
end
group :development do
views
gem 'web-console', '~> 2.0'
gem 'spring'
end
Can somebody point me in the right direction?
I face similar problem recently after running bundle update
Try to downgrade a gemset to 2.5.0 as follows:
gem update --system 2.5.0
It seems like there is a bug in 2.5.1 version.
Related
I'm new to rails and was trying with rvm
rvm use 2.4.1
rails _4.2.11.1_ new hello_app
cd hello_app
rails s
which works with Rails 5 but fails with rails 4 and ruby 2.4.1 on my Mac
Gem::LoadError (Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).):
activerecord (4.2.11.1) lib/active_record/connection_adapters/connection_specification.rb:177:in `rescue in spec'
My Gemfile which is what rails new generated without comments
source 'https://rubygems.org'
gem 'rails', '4.2.11.1'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
runtimes
gem 'jquery-rails'
more: https://github.com/rails/turbolinks
gem 'turbolinks'
https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :test do
gem 'byebug'
end
group :development do
gem 'web-console', '~> 2.0'
gem 'spring'
end
It is just because rails can't find exact version of gem needed, please provide version explicitly as below,
gem 'sqlite3', '~> 1.3.6'
You can find reference here
If it does not work, vary version and try as gem 'sqlite3', '~> 1.3.0' in gemfile.
I was working on a GoRails refile gem course and trying to implement it into my app. When I tried to do bundle install, I kept running into an error message in my console saying that bundle could not find compatible versions for my gem "rack" (screenshot of error below).
I tried looking at these Stackoverflow questions - Bundler could not find compatible versions for gem "rack": In Gemfile: and Bundler could not find compatible versions for gem "rack": without success. I tried multiple approaches - 1. putting rack in my Gemfile, 2. uninstalling all previous rack and then installing rack versions. None seemed to work. I would greatly appreciate any help on this issue. Thank you so much.
Gemfile
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1', '>= 5.1.3'
gem 'sqlite3'
gem 'puma', '~> 3.0'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.2'
gem 'jquery-rails'
gem 'jquery-ui-sass-rails', '~> 4.0', '>= 4.0.3.0'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'bootstrap-sass', '~> 3.3', '>= 3.3.7'
gem 'devise', '~> 4.3'
gem 'omniauth-facebook'
gem 'paperclip', '~> 5.1'
gem 'redis'
gem "font-awesome-rails"
gem "twemoji"
gem 'koala', '~> 2.5'
gem 'chosen-rails'
gem 'devise-bootstrap-views', '~> 0.0.9'
gem 'pry', '~> 0.10.4'
gem 'bootstrap-modal-rails', '~> 2.2', '>= 2.2.5'
gem 'better_errors', '~> 2.3'
gem 'selectize-rails', '~> 0.12.4'
gem 'ransack', '~> 1.8', '>= 1.8.2'
gem 'searchkick', '~> 2.3', '>= 2.3.1'
gem 'jquery-fileupload-rails', '~> 0.4.7'
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'
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]
I already tried to update gem bundle and also try to pick gem 2.1.2 but ruby is not supporting them. Here is the error message:
error message
Gemfile:
source 'https://rubygems.org'
ruby '2.1.2'
gem 'rails', '4.2.4'
gem 'pry-rails'
gem 'pg'
gem 'bcrypt', require: 'bcrypt'
gem 'friendly_id'
gem 'sass-rails', '~> 5.0'
gem 'bootstrap-sass'
gem 'uglifier', '>= 1.3.0'
gem 'jquery-rails'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'puma'
gem 'rails_12factor', group: :production
gem 'newrelic_rpm'
gem 'rack-timeout'
gem 'rmagick'
gem 'aws-sdk'
gem 'paperclip'
group :development, :test do
gem 'byebug'
end
group :development do
gem 'web-console', '~> 2.0'
gem 'binding_of_caller'
gem 'better_errors'
gem 'annotate'
gem 'dotenv-rails'
gem 'spring'
end
It seems that you have defined the ruby version for your project in the Gemfile. If you comment it out then, your app could use the system version of Ruby. If you need further help please publish the code in Gemfile.
I have trouble setting up my gems correctly while working with Heroku. Can someone tell me what it should look like? Here's what it looks like currently:
source 'https://rubygems.org'
gem 'sinatra', '1.0'
gem 'rails', '4.2.6'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :test do
gem 'byebug'
end
group :development do
gem 'web-console', '~> 2.0'
gem 'spring'
end
Help is much appreciated, thanks.
Heroku doesn't support running rails apps using sqlite3 so you should remove that and use pg instead.
Or you could set that for your development env only and set pg for production.
But it's always recommended to run your local env as similar as possible to your production, so that you won't get any surprises when you go live.
source 'https://rubygems.org'
gem 'rails', '4.0.0'
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'
gem 'bootstrap-sass', '~> 3.0.3.0'
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
group :doc do
gem 'sdoc', require: false
end
// When I try to bundle install --without production I get an error message.
This line looks a bit wrong gem 'bootstrap-sass', '~> 3.0.3.0'
Usually you would expect the semantic versioning to go to three levels only
I suspect the problem isn't being picked up when bundling locally.
The bundle install command installs the gems based on the Gemfile.lock file in your project. Try running a bundle update instead - this may resolve any version conflicts you may be having in your Gemfile (depending on if you've made any updates).