I uploaded my Rails app in Openshift server and I obtained the following error:
I searched in Google but I didn't find solutions.
I have Ruby 2.0 and Rails 4.
On my local host my application works without problem but when I upload it it doesn't work because of this error.
I'm on Windows 8.
Here is my Gemfile and Gemfile.lock:
source 'https://rubygems.org'
gem 'rails', '4.2.4'
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'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :jruby]
gem 'rake'
gem 'rack'
gem 'nokogiri'
Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.4)
actionpack (= 4.2.4)
actionview (= 4.2.4)
activejob (= 4.2.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.4)
actionview (= 4.2.4)
activesupport (= 4.2.4)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.4)
activesupport (= 4.2.4)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activejob (4.2.4)
activesupport (= 4.2.4)
globalid (>= 0.3.0)
activemodel (4.2.4)
activesupport (= 4.2.4)
builder (~> 3.1)
activerecord (4.2.4)
activemodel (= 4.2.4)
activesupport (= 4.2.4)
arel (~> 6.0)
activesupport (4.2.4)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
arel (6.0.3)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
builder (3.2.2)
byebug (8.2.2)
coffee-rails (4.1.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.1.x)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
concurrent-ruby (1.0.1)
debug_inspector (0.0.2)
erubis (2.7.0)
execjs (2.6.0)
globalid (0.3.6)
activesupport (>= 4.1.0)
i18n (0.7.0)
jbuilder (2.4.1)
activesupport (>= 3.0.0, < 5.1)
multi_json (~> 1.2)
jquery-rails (4.1.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
loofah (2.0.3)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mime-types (2.99.1)
mini_portile2 (2.0.0)
minitest (5.8.4)
multi_json (1.11.2)
mini_portile2 (~> 2.0.0.rc2)
nokogiri (1.6.7.2-x86-mingw32)
mini_portile2 (~> 2.0.0.rc2)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.4)
actionmailer (= 4.2.4)
actionpack (= 4.2.4)
actionview (= 4.2.4)
activejob (= 4.2.4)
activemodel (= 4.2.4)
activerecord (= 4.2.4)
activesupport (= 4.2.4)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.4)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.7)
activesupport (>= 4.2.0.beta, < 5.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (4.2.4)
actionpack (= 4.2.4)
activesupport (= 4.2.4)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (11.1.0)
rdoc (4.2.2)
json (~> 1.4)
sass (3.4.21)
sass-rails (5.0.4)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
sprockets (3.5.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.0.4)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.11-x86-mingw32)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.2)
turbolinks (2.5.3)
coffee-rails
tzinfo (1.2.2)
thread_safe (~> 0.1)
tzinfo-data (1.2016.1)
tzinfo (>= 1.0.0)
uglifier (2.7.2)
execjs (>= 0.3.0)
json (>= 1.8.0)
web-console (2.3.0)
activemodel (>= 4.0)
binding_of_caller (>= 0.7.2)
railties (>= 4.0)
sprockets-rails (>= 2.0, < 4.0)
PLATFORMS
x86-mingw32
DEPENDENCIES
byebug
coffee-rails (~> 4.1.0)
jbuilder (~> 2.0)
jquery-rails
nokogiri
rack
rails (= 4.2.4)
rake
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
sqlite3
turbolinks
tzinfo-data
uglifier (>= 1.3.0)
web-console (~> 2.0)
BUNDLED WITH
1.10.4
Edit:
C:\Bitnami\game_test>bundle install
Using rake 11.1.0
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.4
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.4
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.0.0
Using nokogiri 1.6.7.2
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.7
Using loofah 2.0.3
Using rails-html-sanitizer 1.0.3
Using actionview 4.2.4
Using rack 1.6.4
Using rack-test 0.6.3
Using actionpack 4.2.4
Using globalid 0.3.6
Using activejob 4.2.4
Using mime-types 2.99.1
Using mail 2.6.3
Using actionmailer 4.2.4
Using activemodel 4.2.4
Using arel 6.0.3
Using activerecord 4.2.4
Using debug_inspector 0.0.2
Using binding_of_caller 0.7.2
Using byebug 8.2.2
Using coffee-script-source 1.10.0
Using execjs 2.6.0
Using coffee-script 2.4.1
Using thor 0.19.1
Using railties 4.2.4
Using coffee-rails 4.1.1
Using concurrent-ruby 1.0.1
Using multi_json 1.11.2
Using jbuilder 2.4.1
Using jquery-rails 4.1.1
Using bundler 1.10.4
Using sprockets 3.5.2
Using sprockets-rails 3.0.4
Using rails 4.2.4
Using rdoc 4.2.2
Using sass 3.4.21
Using tilt 2.0.2
Using sass-rails 5.0.4
Using sdoc 0.4.1
Using sqlite3 1.3.11
Using turbolinks 2.5.3
Using tzinfo-data 1.2016.1
Using uglifier 2.7.2
Using web-console 2.3.0
Updating files in vendor/cache
Bundle complete! 15 Gemfile dependencies, 54 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
Last night, João Gonçalves gave me useful advice.
The problem was on the Openshift server-side because the server wasn't able to load the nokogiri gem.
Here the things I did:
Download Putty for SSH, because I needed to connect to my Openshift server.
You need to download putty.exe and puttygen.exe. I'm on Windows, so if you have another OS you have to find another way to connect through SSH to your server.
Follow this guide to configure Putty.
When you have to enter the hostname or IP in Putty for the is prompt:
Hostname(or IP address)
you have to take your Remote Access (the string under Remote Access without the SSH prefix), as you can see in the picture, and paste it into Putty.
Connect to your server and change to the directory of your application. I saw where my directory was using rhc tail appname. As you can see in the first picture of this post you can see the following path:
openshift/56e4ae0e0c1e66cdb7000051/app-root/runtime/repo/
You have to move into the repo directory.
Run gem install bundler.
Run bundle install --no-deployment.
And to be sure, after this, run bundle install.
You should now have nokogiri installed on your host.
Try to launch your application from the URL and you should be able to see the right page with no error.
Your Gemfile.lock specifies the mingw platform, since your dev machine is Windows. OpenShift, however, runs Linux containers.
Don't upload your Gemfile.lock file, and instead let OpenShift's staging process find the right gems to match the platform.
Related
Upon running the command git push heroku master I got the error:
remote: Downloading nokogiri-1.8.2 revealed dependencies not in the API or the lockfile
remote: (mini_portile2 (~> 2.3.0)).
remote: Either installing with `--full-index` or running `bundle update nokogiri` should
remote: fix the problem.
remote:
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to fathomless-journey-80413.
remote:
I stumbled upon this page (https://forum.theodinproject.com/t/heroku-installfest/28/2) which
suggested the steps below:
In your Gemfile, change:
gem 'pg'
to
gem 'pg', '~> 0.20.0'
Delete the file called Gemfile.lock
Run bundle install --without production
Run git commit -am "add version to pg"
Run git push Heroku master
Above steps solved my problem but now I'm getting a similar error again
remote: Downloading actionpack-4.2.10 revealed dependencies not in the API or the
remote: lockfile (rack-test (~> 0.6.2)).
remote: Either installing with `--full-index` or running `bundle update actionpack`
remote: should fix the problem.
remote:
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to fathomless-journey-80413.
remote:
my gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.10'
# Use sqlite3 as the database for Active Record
#gem 'sqlite3'
#gem 'pg'
gem 'pg', '~> 0.20.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.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
This is my gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.10)
actionpack (= 4.2.10)
actionview (= 4.2.10)
activejob (= 4.2.10)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.10)
actionview (= 4.2.10)
activesupport (= 4.2.10)
rack (~> 1.6)
rack-test (~> 0.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.10)
activesupport (= 4.2.10)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (4.2.10)
activesupport (= 4.2.10)
globalid (>= 0.3.0)
activemodel (4.2.10)
activesupport (= 4.2.10)
builder (~> 3.1)
activerecord (4.2.10)
activemodel (= 4.2.10)
activesupport (= 4.2.10)
arel (~> 6.0)
activesupport (4.2.10)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
arel (6.0.4)
binding_of_caller (0.8.0)
debug_inspector (>= 0.0.1)
builder (3.2.4)
byebug (11.1.1)
coffee-rails (4.1.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.1.x)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.6)
crass (1.0.6)
debug_inspector (0.0.3)
erubis (2.7.0)
execjs (2.7.0)
ffi (1.12.2)
globalid (0.4.2)
activesupport (>= 4.2.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jbuilder (2.9.1)
activesupport (>= 4.2.0)
jquery-rails (4.3.5)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
loofah (2.5.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.0)
nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
pg (0.20.0)
rack (1.6.13)
rack-test (0.7.0)
rack (>= 1.0, < 3)
rails (4.2.10)
actionmailer (= 4.2.10)
actionpack (= 4.2.10)
actionview (= 4.2.10)
activejob (= 4.2.10)
activemodel (= 4.2.10)
activerecord (= 4.2.10)
activesupport (= 4.2.10)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.10)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.9)
activesupport (>= 4.2.0, < 5.0)
nokogiri (~> 1.6)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
railties (4.2.10)
actionpack (= 4.2.10)
activesupport (= 4.2.10)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (13.0.1)
rb-fsevent (0.10.3)
rb-inotify (0.10.1)
ffi (~> 1.0)
rdoc (6.2.1)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.0.7)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sdoc (1.1.0)
rdoc (>= 5.0)
spring (2.1.0)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
thor (1.0.1)
thread_safe (0.3.6)
tilt (2.0.10)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.7)
thread_safe (~> 0.1)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
web-console (2.3.0)
activemodel (>= 4.0)
binding_of_caller (>= 0.7.2)
railties (>= 4.0)
sprockets-rails (>= 2.0, < 4.0)
PLATFORMS
ruby
DEPENDENCIES
byebug
coffee-rails (~> 4.1.0)
jbuilder (~> 2.0)
jquery-rails
pg (~> 0.20.0)
rails (= 4.2.10)
sass-rails (~> 5.0)
sdoc (>= 0.4.0)
spring
turbolinks
uglifier (>= 1.3.0)
web-console (~> 2.0)
BUNDLED WITH
1.16.1
Any help would be appreciated...
Thanks in advance.
EDIT: Output for bundle update actionpack gives me:
Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies....
Using rake 13.0.1
Using concurrent-ruby 1.1.6
Using i18n 0.9.5
Using minitest 5.14.0
Using thread_safe 0.3.6
Using tzinfo 1.2.7
Using activesupport 4.2.10
Using builder 3.2.4
Using erubis 2.7.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.9
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.9
Using crass 1.0.6
Using loofah 2.5.0
Using rails-html-sanitizer 1.3.0
Using actionview 4.2.10
Using rack 1.6.13
Using rack-test 0.7.0
Using actionpack 4.2.10
Using globalid 0.4.2
Using activejob 4.2.10
Using mini_mime 1.0.2
Using mail 2.7.1
Using actionmailer 4.2.10
Using activemodel 4.2.10
Using arel 6.0.4
Using activerecord 4.2.10
Using debug_inspector 0.0.3
Using binding_of_caller 0.8.0
Using bundler 1.16.1
Using byebug 11.1.1
Using coffee-script-source 1.12.2
Using execjs 2.7.0
Using coffee-script 2.4.1
Using thor 1.0.1
Using railties 4.2.10
Using coffee-rails 4.1.1
Using ffi 1.12.2
Using jbuilder 2.9.1
Using jquery-rails 4.3.5
Using pg 0.20.0
Using sprockets 3.7.2
Using sprockets-rails 3.2.1
Using rails 4.2.10
Using rb-fsevent 0.10.3
Using rb-inotify 0.10.1
Using rdoc 6.2.1
Using sass-listen 4.0.0
Using sass 3.7.4
Using tilt 2.0.10
Using sass-rails 5.0.7
Using sdoc 1.1.0
Using spring 2.1.0
Using turbolinks-source 5.2.0
Using turbolinks 5.2.1
Using uglifier 4.2.0
Using web-console 2.3.0
Bundler attempted to update actionpack but its version stayed the same
Bundle updated!
Gems in the group production were not installed.
EDIT: I think that somehow the fault was due to installing ruby via apt-get so I removed it and installed ruby all over again using rvm and it worked out!!!!!
Thanks for your suggestions..
First of everything, this is my first question.
I used Strack Overflow just for years, an I want to say thank you for every single guy that expend time Asking and Answering questions.
You guys made possible my career
I'm trying to deploy a Rails app in Heroku but I'm receiving this error after pushing the branch:
Failed to install gems via Bundler.
My gems files are really simples:
Gemfile:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.3.1'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.0'
gem 'pg', '~> 0.21'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'bootsnap', '>= 1.1.0', require: false
gem 'responders'
gem 'dotenv-rails'
gem 'active_model_serializers', '~>0.9.4'
gem 'httparty'
group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
#gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Gemfile.lock:
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.0)
actionpack (= 5.2.0)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.0)
actionpack (= 5.2.0)
actionview (= 5.2.0)
activejob (= 5.2.0)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.0)
actionview (= 5.2.0)
activesupport (= 5.2.0)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.0)
activesupport (= 5.2.0)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
active_model_serializers (0.9.7)
activemodel (>= 3.2)
concurrent-ruby (~> 1.0)
activejob (5.2.0)
activesupport (= 5.2.0)
globalid (>= 0.3.6)
activemodel (5.2.0)
activesupport (= 5.2.0)
activerecord (5.2.0)
activemodel (= 5.2.0)
activesupport (= 5.2.0)
arel (>= 9.0)
activestorage (5.2.0)
actionpack (= 5.2.0)
activerecord (= 5.2.0)
marcel (~> 0.3.1)
activesupport (5.2.0)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
arel (9.0.0)
bindex (0.5.0)
bootsnap (1.3.1)
msgpack (~> 1.0)
builder (3.2.3)
byebug (10.0.2)
concurrent-ruby (1.0.5)
crass (1.0.4)
dotenv (2.5.0)
dotenv-rails (2.5.0)
dotenv (= 2.5.0)
railties (>= 3.2, < 6.0)
erubi (1.7.1)
execjs (2.7.0)
ffi (1.9.25)
globalid (0.4.1)
activesupport (>= 4.2.0)
httparty (0.16.2)
multi_xml (>= 0.5.2)
i18n (1.0.1)
concurrent-ruby (~> 1.0)
jbuilder (2.7.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.2.2)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.0)
mini_mime (>= 0.1.1)
marcel (0.3.2)
mimemagic (~> 0.3.2)
method_source (0.9.0)
mimemagic (0.3.2)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
minitest (5.11.3)
msgpack (1.2.4)
multi_json (1.13.1)
multi_xml (0.6.0)
nio4r (2.3.1)
nokogiri (1.8.4)
mini_portile2 (~> 2.3.0)
pg (0.21.0)
rack (2.0.5)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.0)
actioncable (= 5.2.0)
actionmailer (= 5.2.0)
actionpack (= 5.2.0)
actionview (= 5.2.0)
activejob (= 5.2.0)
activemodel (= 5.2.0)
activerecord (= 5.2.0)
activestorage (= 5.2.0)
activesupport (= 5.2.0)
bundler (>= 1.3.0)
railties (= 5.2.0)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (5.2.0)
actionpack (= 5.2.0)
activesupport (= 5.2.0)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.3.1)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
responders (2.4.0)
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
ruby_dep (1.5.0)
sass (3.5.7)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.0.7)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
thor (0.20.0)
thread_safe (0.3.6)
tilt (2.0.8)
turbolinks (5.1.1)
turbolinks-source (~> 5.1)
turbolinks-source (5.1.0)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uglifier (4.1.17)
execjs (>= 0.3.0, < 3)
web-console (3.6.2)
actionview (>= 5.0)
activemodel (>= 5.0)
bindex (>= 0.4.0)
railties (>= 5.0)
websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
PLATFORMS
ruby
DEPENDENCIES
active_model_serializers (~> 0.9.4)
bootsnap (>= 1.1.0)
byebug
dotenv-rails
httparty
jbuilder (~> 2.5)
listen (>= 3.0.5, < 3.2)
pg (~> 0.21)
rails (~> 5.2.0)
responders
sass-rails (~> 5.0)
turbolinks (~> 5)
uglifier (>= 1.3.0)
web-console (>= 3.3.0)
RUBY VERSION
ruby 2.3.1p112
BUNDLED WITH
1.16.3
Complete build log
! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
Detected buildpacks: Ruby,Node.js
See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.3.1
-----> Installing dependencies using bundler 1.15.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
The dependencies in your gemfile changed
You have added to the Gemfile:
* responders
* dotenv-rails
* active_model_serializers (~> 0.9.4)
* httparty
You have deleted from the Gemfile:
* capybara (< 4.0, >= 2.15)
* chromedriver-helper
* coffee-rails (~> 4.2)
* selenium-webdriver
* spring
* spring-watcher-listen (~> 2.0.0)
Bundler Output: You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
The dependencies in your gemfile changed
You have added to the Gemfile:
* responders
* dotenv-rails
* active_model_serializers (~> 0.9.4)
* httparty
You have deleted from the Gemfile:
* capybara (< 4.0, >= 2.15)
* chromedriver-helper
* coffee-rails (~> 4.2)
* selenium-webdriver
* spring
* spring-watcher-listen (~> 2.0.0)
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby app.
! Push failed
I already tried re-building my Gemfile.lock.
I deleted it and run bundle update + bundle install
This is my first time in Heroku, and I afraid that maybe I'm pushing some incompatibles gems.
About the settings:
ruby 2.3.1 and rails 5.2.0
I will appreciate your help!
Thanks.
I found that adding the current ruby version you are running into the gem file then running
bundle update --ruby
does the job pretty well.
This article from heroku explains more
https://devcenter.heroku.com/articles/ruby-versions
I'm beginner in RoR, I have an error When I run rspec in rails I'm getting this error message:
You have already activated json 2.0.2, but your Gemfile requires json 1.8.6. Prepending bundle exec to your command may solve this. (Gem::LoadError)
I have tried to update json gem by "bundle update json", but still getting the same error message.
Could someone helps me on this.
I'm using:- Ruby 2.3.0
- Rails 4.2.7.1
- gem version 2.5.1
Thank you!
Here is my Gemfile content:
source "https://rubygems.org"
ruby "2.3.0"
gem "dhis2", github: 'BLSQ/dhis2'
gem "rails", "4.2.7.1"
gem "awesome_print", "1.6.1"
gem "pg", "0.18.4"
gem "sass-rails", "5.0.6"
gem "uglifier", "3.0.0"
gem "coffee-rails", "4.1.0"
gem "therubyracer", "0.12.2"
gem "jquery-rails", "4.1.1"
gem "translation", "1.6"
gem "slim", "3.0.6"
gem "bootstrap-sass", "3.3.6"
gem "rails_admin", "0.8.1"
gem "devise", "4.0.0"
gem "simple_form", "3.2.1"
gem "rest-client", "2.0.0"
gem "figaro", "1.1.1"
gem "sidekiq", "4.1.1"
gem "unicorn", "5.1.0"
gem "sentry-raven", "0.15.6"
gem "sinatra", require: nil
gem "will_paginate", "3.1.0"
gem "will_paginate-bootstrap", "1.0.1"
gem "rubyzip", "~> 1.1.0"
gem "axlsx", "2.1.0.pre"
gem "axlsx_rails"
gem "jquery-ui-rails"
gem "rails4-autocomplete"
gem "chosen-rails"
group :production do
gem "rails_12factor", "0.0.3"
end
group :development, :test do
gem "derailed"
gem "byebug"
gem "database_cleaner"
gem "factory_girl_rails", " 4.0"
gem "faker"
gem "rspec-its"
gem "rspec-rails", "~> 3.0"
gem "shoulda-matchers", require: false
gem "rails-erd"
gem "mailcatcher"
gem "rest-client-logger"
end
group :development do
gem "annotate"
gem "web-console", "2.0"
gem "spring"
gem 'rack-mini-profiler'
gem 'memory_profiler'
gem 'flamegraph'
gem 'stackprof'
end
group :test do
gem "simplecov", require: false
gem "codeclimate-test-reporter", "~> 1.0.0"
gem "webmock"
gem "rspec-sidekiq", "~> 2.2.0"
end
And Here is Gemfile.lock:
GIT
revision: d91e3ebecefc3ded8c17d7d786a7de6d42efebfb
specs:
dhis2 (2.2.1)
rest-client
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.7.1)
actionpack (= 4.2.7.1)
actionview (= 4.2.7.1)
activejob (= 4.2.7.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.7.1)
actionview (= 4.2.7.1)
activesupport (= 4.2.7.1)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.7.1)
activesupport (= 4.2.7.1)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activejob (4.2.7.1)
activesupport (= 4.2.7.1)
globalid (>= 0.3.0)
activemodel (4.2.7.1)
activesupport (= 4.2.7.1)
builder (~> 3.1)
activerecord (4.2.7.1)
activemodel (= 4.2.7.1)
activesupport (= 4.2.7.1)
arel (~> 6.0)
activesupport (4.2.7.1)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.5.0)
public_suffix (~> 2.0, >= 2.0.2)
annotate (2.7.1)
activerecord (>= 3.2, < 6.0)
rake (>= 10.4, < 12.0)
arel (6.0.4)
autoprefixer-rails (6.6.1)
execjs
awesome_print (1.6.1)
axlsx (2.1.0.pre)
htmlentities (~> 4.3.1)
nokogiri (>= 1.4.1)
rubyzip (~> 1.1.7)
axlsx_rails (0.5.0)
actionpack (>= 3.1)
axlsx (>= 2.0.1)
bcrypt (3.1.11)
benchmark-ips (2.7.2)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bootstrap-sass (3.3.6)
autoprefixer-rails (>= 5.2.1)
sass (>= 3.3.4)
builder (3.2.3)
byebug (9.0.6)
choice (0.2.0)
chosen-rails (1.5.2)
coffee-rails (>= 3.2)
railties (>= 3.0)
sass-rails (>= 3.2)
codeclimate-test-reporter (1.0.4)
simplecov
coffee-rails (4.1.0)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.0.4)
connection_pool (2.2.1)
crack (0.4.3)
safe_yaml (~> 1.0.0)
daemons (1.2.4)
database_cleaner (1.5.3)
debug_inspector (0.0.2)
derailed (0.1.0)
derailed_benchmarks
derailed_benchmarks (1.3.2)
benchmark-ips (~> 2)
get_process_mem (~> 0)
heapy (~> 0)
memory_profiler (~> 0)
rack (>= 1)
rake (> 10, < 13)
thor (~> 0.19)
devise (4.0.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0, < 5.1)
responders
warden (~> 1.2.3)
diff-lcs (1.2.5)
docile (1.1.5)
domain_name (0.5.20161129)
unf (>= 0.0.5, < 1.0.0)
erubis (2.7.0)
eventmachine (1.0.9.1)
execjs (2.7.0)
factory_girl (4.0.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.0.0)
factory_girl (~> 4.0.0)
railties (>= 3.0.0)
faker (1.7.2)
i18n (~> 0.5)
faraday (0.11.0)
multipart-post (>= 1.2, < 3)
figaro (1.1.1)
thor (~> 0.14)
flamegraph (0.9.5)
font-awesome-rails (4.7.0.1)
railties (>= 3.2, < 5.1)
get_process_mem (0.2.1)
gettext (3.1.7)
locale (>= 2.0.5)
text (>= 1.3.0)
globalid (0.3.7)
activesupport (>= 4.1.0)
haml (4.0.7)
tilt
hashdiff (0.3.2)
heapy (0.1.2)
htmlentities (4.3.4)
http-cookie (1.0.3)
domain_name (~> 0.5)
i18n (0.7.0)
jquery-rails (4.1.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (5.0.5)
railties (>= 3.2.16)
json (1.8.6)
kaminari (0.17.0)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
kgio (2.11.0)
libv8 (3.16.14.17)
locale (2.1.2)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.4)
mime-types (>= 1.16, < 4)
mailcatcher (0.6.5)
eventmachine (= 1.0.9.1)
mail (~> 2.3)
rack (~> 1.5)
sinatra (~> 1.2)
skinny (~> 0.2.3)
sqlite3 (~> 1.3)
thin (~> 1.5.0)
memory_profiler (0.9.7)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.10.1)
multipart-post (2.0.0)
nested_form (0.3.2)
netrc (0.11.0)
nokogiri (1.7.0.1)
mini_portile2 (~> 2.1.0)
orm_adapter (0.5.0)
pg (0.18.4)
public_suffix (2.0.5)
rack (1.6.5)
rack-mini-profiler (0.10.1)
rack (>= 1.2.0)
rack-pjax (0.8.0)
nokogiri (~> 1.5)
rack (~> 1.1)
rack-protection (1.5.3)
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.7.1)
actionmailer (= 4.2.7.1)
actionpack (= 4.2.7.1)
actionview (= 4.2.7.1)
activejob (= 4.2.7.1)
activemodel (= 4.2.7.1)
activerecord (= 4.2.7.1)
activesupport (= 4.2.7.1)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.7.1)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.8)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6)
rails-deprecated_sanitizer (>= 1.0.1)
rails-erd (1.5.0)
activerecord (>= 3.2)
activesupport (>= 3.2)
choice (~> 0.2.0)
ruby-graphviz (~> 1.2)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
rails4-autocomplete (1.1.1)
rails (>= 3.0)
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_admin (0.8.1)
builder (~> 3.1)
coffee-rails (~> 4.0)
font-awesome-rails (>= 3.0, < 5)
haml (~> 4.0)
jquery-rails (>= 3.0, < 5)
jquery-ui-rails (~> 5.0)
kaminari (~> 0.14)
nested_form (~> 0.3)
rack-pjax (~> 0.7)
rails (~> 4.0)
remotipart (~> 1.0)
safe_yaml (~> 1.0)
sass-rails (>= 4.0, < 6)
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
railties (4.2.7.1)
actionpack (= 4.2.7.1)
activesupport (= 4.2.7.1)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.17.0)
rake (11.3.0)
redis (3.3.2)
ref (2.0.0)
remotipart (1.3.1)
responders (2.3.0)
railties (>= 4.2.0, < 5.1)
rest-client (2.0.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rest-client-logger (0.0.1)
railties (>= 3.1)
rest-client (>= 1.6)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-core (3.5.4)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-its (1.2.0)
rspec-core (>= 3.0.0)
rspec-expectations (>= 3.0.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-rails (3.5.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-support (~> 3.5.0)
rspec-sidekiq (2.2.0)
rspec (~> 3.0, >= 3.0.0)
sidekiq (>= 2.4.0)
rspec-support (3.5.0)
ruby-graphviz (1.2.2)
rubyzip (1.1.7)
safe_yaml (1.0.4)
sass (3.4.23)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sentry-raven (0.15.6)
faraday (>= 0.7.6)
shoulda-matchers (3.1.1)
activesupport (>= 4.0.0)
sidekiq (4.1.1)
concurrent-ruby (~> 1.0)
connection_pool (~> 2.2, >= 2.2.0)
redis (~> 3.2, >= 3.2.1)
simple_form (3.2.1)
actionpack (> 4, < 5.1)
activemodel (> 4, < 5.1)
simplecov (0.12.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
sinatra (1.4.7)
rack (~> 1.5)
rack-protection (~> 1.4)
tilt (>= 1.3, < 3)
skinny (0.2.4)
eventmachine (~> 1.0.0)
thin (>= 1.5, < 1.7)
slim (3.0.6)
temple (~> 0.7.3)
tilt (>= 1.3.3, < 2.1)
spring (2.0.0)
activesupport (>= 4.2)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.13)
stackprof (0.2.10)
temple (0.7.7)
text (1.3.1)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
ref
thin (1.5.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.19.4)
thread_safe (0.3.5)
tilt (2.0.5)
translation (1.6)
gettext (= 3.1.7)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (3.0.0)
execjs (>= 0.3.0, < 3)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.2)
unicorn (5.1.0)
kgio (~> 2.6)
raindrops (~> 0.7)
warden (1.2.6)
rack (>= 1.0)
web-console (2.0.0)
activemodel (~> 4.0)
binding_of_caller (>= 0.7.2)
railties (~> 4.0)
sprockets-rails (>= 2.0, < 4.0)
webmock (2.3.2)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
will_paginate (3.1.0)
will_paginate-bootstrap (1.0.1)
will_paginate (>= 3.0.3)
PLATFORMS
ruby
DEPENDENCIES
annotate
awesome_print (= 1.6.1)
axlsx (= 2.1.0.pre)
axlsx_rails
bootstrap-sass (= 3.3.6)
byebug
chosen-rails
codeclimate-test-reporter (~> 1.0.0)
coffee-rails (= 4.1.0)
database_cleaner
derailed
devise (= 4.0.0)
dhis2!
factory_girl_rails (= 4.0)
faker
figaro (= 1.1.1)
flamegraph
jquery-rails (= 4.1.1)
jquery-ui-rails
mailcatcher
memory_profiler
pg (= 0.18.4)
rack-mini-profiler
rails (= 4.2.7.1)
rails-erd
rails4-autocomplete
rails_12factor (= 0.0.3)
rails_admin (= 0.8.1)
rest-client (= 2.0.0)
rest-client-logger
rspec-its
rspec-rails (~> 3.0)
rspec-sidekiq (~> 2.2.0)
rubyzip (~> 1.1.0)
sass-rails (= 5.0.6)
sentry-raven (= 0.15.6)
shoulda-matchers
sidekiq (= 4.1.1)
simple_form (= 3.2.1)
simplecov
sinatra
slim (= 3.0.6)
spring
stackprof
therubyracer (= 0.12.2)
translation (= 1.6)
uglifier (= 3.0.0)
unicorn (= 5.1.0)
web-console (= 2.0)
webmock
will_paginate (= 3.1.0)
will_paginate-bootstrap (= 1.0.1)
RUBY VERSION
ruby 2.3.0p0
BUNDLED WITH
1.13.7
Bundle install result:
Using rake 11.3.0
Using i18n 0.7.0
Using json 1.8.6
Using minitest 5.10.1
Using thread_safe 0.3.5
Using builder 3.2.3
Using erubis 2.7.0
Using mini_portile2 2.1.0
Using rack 1.6.5
Using mime-types-data 3.2016.0521
Using arel 6.0.4
Using public_suffix 2.0.5
Using execjs 2.7.0
Using awesome_print 1.6.1
Using htmlentities 4.3.4
Using rubyzip 1.1.7
Using bcrypt 3.1.11
Using benchmark-ips 2.7.2
Using debug_inspector 0.0.2
Using sass 3.4.23
Using byebug 9.0.6
Using choice 0.2.0
Using coffee-script-source 1.12.2
Using thor 0.19.4
Using concurrent-ruby 1.0.4
Using tilt 2.0.5
Using docile 1.1.5
Using simplecov-html 0.10.0
Using connection_pool 2.2.1
Using safe_yaml 1.0.4
Using daemons 1.2.4
Using database_cleaner 1.5.3
Using get_process_mem 0.2.1
Using heapy 0.1.2
Using memory_profiler 0.9.7
Using orm_adapter 0.5.0
Using unf_ext 0.0.7.2
Using netrc 0.11.0
Using diff-lcs 1.2.5
Using eventmachine 1.0.9.1
Using multipart-post 2.0.0
Using flamegraph 0.9.5
Using locale 2.1.2
Using text 1.3.1
Using hashdiff 0.3.2
Using kgio 2.11.0
Using libv8 3.16.14.17
Using sqlite3 1.3.13
Using nested_form 0.3.2
Using pg 0.18.4
Using bundler 1.13.7
Using ruby-graphviz 1.2.2
Using rails_serve_static_assets 0.0.5
Using rails_stdout_logging 0.0.5
Using remotipart 1.3.1
Using raindrops 0.17.0
Using redis 3.3.2
Using ref 2.0.0
Using rspec-support 3.5.0
Using temple 0.7.7
Using stackprof 0.2.10
Using will_paginate 3.1.0
Using faker 1.7.2
Using tzinfo 1.2.2
Using nokogiri 1.7.0.1
Using rack-test 0.6.3
Using warden 1.2.6
Using rack-protection 1.5.3
Using rack-mini-profiler 0.10.1
Using mime-types 3.1
Using addressable 2.5.0
Using autoprefixer-rails 6.6.1
Using uglifier 3.0.0
Using binding_of_caller 0.7.2
Using coffee-script 2.4.1
Using figaro 1.1.1
Using sprockets 3.7.1
Using haml 4.0.7
Using simplecov 0.12.0
Using crack 0.4.3
Using derailed_benchmarks 1.3.2
Using unf 0.1.4
Using thin 1.5.1
Using faraday 0.11.0
Using gettext 3.1.7
Using rails_12factor 0.0.3
Using unicorn 5.1.0
Using sidekiq 4.1.1
Using therubyracer 0.12.2
Using rspec-core 3.5.4
Using rspec-expectations 3.5.0
Using rspec-mocks 3.5.0
Using slim 3.0.6
Using will_paginate-bootstrap 1.0.1
Using activesupport 4.2.7.1
Using loofah 2.0.3
Using axlsx 2.1.0.pre
Using rack-pjax 0.8.0
Using sinatra 1.4.7
Using mail 2.6.4
Using bootstrap-sass 3.3.6
Using codeclimate-test-reporter 1.0.4
Using webmock 2.3.2
Using derailed 0.1.0
Using domain_name 0.5.20161129
Using skinny 0.2.4
Using sentry-raven 0.15.6
Using translation 1.6
Using rspec-its 1.2.0
Using rspec 3.5.0
Using rails-deprecated_sanitizer 1.0.3
Using globalid 0.3.7
Using activemodel 4.2.7.1
Using factory_girl 4.0.0
Using shoulda-matchers 3.1.1
Using spring 2.0.0
Using rails-html-sanitizer 1.0.3
Using http-cookie 1.0.3
Using mailcatcher 0.6.5
Using rspec-sidekiq 2.2.0
Using rails-dom-testing 1.0.8
Using activejob 4.2.7.1
Using activerecord 4.2.7.1
Using rest-client 2.0.0
Using actionview 4.2.7.1
Using annotate 2.7.1
Using rails-erd 1.5.0
Using dhis2 2.2.1 from git://github.com/BLSQ/dhis2.git (at master#d91e3eb)
Using actionpack 4.2.7.1
Using actionmailer 4.2.7.1
Using axlsx_rails 0.5.0
Using railties 4.2.7.1
Using sprockets-rails 3.2.0
Using kaminari 0.17.0
Using simple_form 3.2.1
Using coffee-rails 4.1.0
Using responders 2.3.0
Using factory_girl_rails 4.0.0
Using font-awesome-rails 4.7.0.1
Using jquery-rails 4.1.1
Using jquery-ui-rails 5.0.5
Using rest-client-logger 0.0.1
Using rspec-rails 3.5.2
Using sass-rails 5.0.6
Using rails 4.2.7.1
Using web-console 2.0.0
Using devise 4.0.0
Using chosen-rails 1.5.2
Using rails4-autocomplete 1.1.1
Using rails_admin 0.8.1
Bundle complete! 52 Gemfile dependencies, 150 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
Problem
More than likely, the line in your Gemfile that includes the json gem looks like this:
gem 'json', '~> 2.0', '>= 2.0.3'
or something similar. This is telling rails that you want a specific version of the json gem and that the gem must be between version 2.0.3 and 2.1. The error you are getting indicates that rails is expecting an earlier version of the gem.
Solution
Remove the version indicators so that the json line in your Gemfile looks like this:
gem 'json', '~> 1.8', '>= 1.8.6'
If that doesn't work, then simply try this:
gem 'json'
Don't forget to run bundle install after modifying your Gemfile!
The version required by the gemfile is json 1.8.6 which is older than json 2.0.2 which you already have, you can try this
gem 'json', '1.8.6'
Downgrade to json 1.8.6, might be helpful.
Trying to run 'rails g rspec:install' and keep running into error:
Could not find xpath-2.0.0 in any of the sources
Run `bundle install` to install missing gems.
I am running
ruby 2.2.0p0
rails 4.2.0
I have tried looking around for answers, but as I am relatively new to ruby and rails I couldn't find an answer. I have tried some of the following suggestions from other threads to no avail:
sometimes we doesn’t get response from http://rubygems.org/ so it will shows error again try gem install rake to install latest version (10.0.4) of rake, and next bundle update rake to update the Gemfile.lock
(Could not find rake-10.0.4 in any of the sources (Bundler::GemNotFound))
and
Try to delete Gemfile.lock and bundle install
(Could not find rake-10.0.4 in any of the sources (Bundler::GemNotFound))
no luck with any of those options.
GemFile:
source 'https://rubygems.org'
gem 'rails', '4.2.0'
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'
gem 'web-console', '~> 2.0'
gem 'spring'
gem 'rspec-rails', '~> 2.0'
end
group :test do
gem 'capybara', '~>2.1.0'
end
Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.0)
actionpack (= 4.2.0)
actionview (= 4.2.0)
activejob (= 4.2.0)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.0)
actionview (= 4.2.0)
activesupport (= 4.2.0)
rack (~> 1.6.0)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
actionview (4.2.0)
activesupport (= 4.2.0)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
activejob (4.2.0)
activesupport (= 4.2.0)
globalid (>= 0.3.0)
activemodel (4.2.0)
activesupport (= 4.2.0)
builder (~> 3.1)
activerecord (4.2.0)
activemodel (= 4.2.0)
activesupport (= 4.2.0)
arel (~> 6.0)
activesupport (4.2.0)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
arel (6.0.0)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
builder (3.2.2)
byebug (3.5.1)
columnize (~> 0.8)
debugger-linecache (~> 1.2)
slop (~> 3.6)
capybara (2.1.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
coffee-rails (4.1.0)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.3.0)
coffee-script-source
execjs
coffee-script-source (1.9.0)
columnize (0.9.0)
debug_inspector (0.0.2)
debugger-linecache (1.2.0)
diff-lcs (1.2.5)
erubis (2.7.0)
execjs (2.3.0)
globalid (0.3.0)
activesupport (>= 4.1.0)
hike (1.2.3)
i18n (0.7.0)
jbuilder (2.2.6)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (4.0.3)
rails-dom-testing (~> 1.0)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.2)
loofah (2.0.1)
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mime-types (2.4.3)
mini_portile (0.6.2)
minitest (5.5.1)
multi_json (1.10.1)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
rack (1.6.0)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.0)
actionmailer (= 4.2.0)
actionpack (= 4.2.0)
actionview (= 4.2.0)
activejob (= 4.2.0)
activemodel (= 4.2.0)
activerecord (= 4.2.0)
activesupport (= 4.2.0)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.0)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.5)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.1)
loofah (~> 2.0)
railties (4.2.0)
actionpack (= 4.2.0)
activesupport (= 4.2.0)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.4.2)
rdoc (4.2.0)
json (~> 1.4)
rspec-collection_matchers (1.1.2)
rspec-expectations (>= 2.99.0.beta1)
rspec-core (2.99.2)
rspec-expectations (2.99.2)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.99.3)
rspec-rails (2.99.0)
actionpack (>= 3.0)
activemodel (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-collection_matchers
rspec-core (~> 2.99.0)
rspec-expectations (~> 2.99.0)
rspec-mocks (~> 2.99.0)
sass (3.4.11)
sass-rails (5.0.1)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (~> 1.1)
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
slop (3.6.0)
spring (1.2.0)
sprockets (2.12.3)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.2.4)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.10)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
turbolinks (2.5.3)
coffee-rails
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.7.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
web-console (2.0.0)
activemodel (~> 4.0)
binding_of_caller (>= 0.7.2)
railties (~> 4.0)
sprockets-rails (>= 2.0, < 4.0)
xpath (2.0.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
byebug
capybara (~> 2.1.0)
coffee-rails (~> 4.1.0)
jbuilder (~> 2.0)
jquery-rails
rails (= 4.2.0)
rspec-rails (~> 2.0)
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
spring
sqlite3
turbolinks
uglifier (>= 1.3.0)
web-console (~> 2.0)
RubyGems Environment:
- RUBYGEMS VERSION: 2.4.5
- RUBY VERSION: 2.0.0 (2014-05-08 patchlevel 481) [universal.x86_64-darwin14]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/2.0.0
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/bin
- SPEC CACHE DIRECTORY: /volumes/ALEX/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Library/Ruby/Site
- RUBYGEMS PLATFORMS:
- ruby
- universal-darwin-14
- GEM PATHS:
- /Library/Ruby/Gems/2.0.0
- /volumes/ALEX/.gem/ruby/2.0.0
- /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /Users/alexmattson/.rbenv/versions/2.2.0/bin/
which gem
/usr/bin/gem
which bundle
/usr/bin/bundle
Not sure what the hang up would be as it's listed as a dependency of Capybara, but have you tried:
gem install xpath -v '2.0.0'
If that succeeds, rerun your bundle install.
Edit:
It looks like you're trying to use RBENV, but your gems are installing to your system version of Ruby. First, you should never have to use sudo on a gem install using RVM or RBENV.
Taken from the RBENV install documentation: https://github.com/sstephenson/rbenv
It looks like step 3 might have been skipped, so verify by running from step 4:
type rbenv
#=> "rbenv is a function"
If this fails, you'll need to add eval "$(rbenv init -)" to your shell (.bash_profile, .bashrc or .zshrc depending on what OS and shell you're running).
Make sure to restart your terminal for any shell changes to take effect.
Run rbenv rehash then you should get something like this when you run which gem again:
which gem
#=> /Users/your-user-name/.rbenv/shims/gem
If this works, run gem install bundle, cd into your project directory and bundle install should work.
Yes, new version of RudyOnRails has some conflicts with Spring. Just try type in console spring stop and rerun rails generate rspec:install
Find out more info in https://github.com/rspec/rspec-rails/issues/996
It looks like I had a bad install of rbenv. After a reinstall it fixed the issue.
A while ago I did a simple bundle update to get all my gems up to date on my Ruby on Rails project. However, at one point, I got an error about Nokogiri:
Building nokogiri using packaged libraries.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/scott/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb
Building nokogiri using packaged libraries.
-----
libiconv is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
I did some hunting and found instructions to deal with this on the Nokogiri website. The following works after I manually installed libiconv according to their instructions:
gem update nokogiri -- --with-iconv-include=/usr/local/Cellar/libiconv/1.13.1/include --with-iconv-lib=/usr/local/Cellar/libiconv/1.13.1/lib
So afterwards I can run bundle update and all is good! The annoying thing is I have to go through this every time I run bundle update it seems as Nokogiri is updated somewhat frequently... Is there a way to automatically deal with this? I understand Nokogiri is a popular gem! A lot of people must be running into this issue.
UPDATE:
As requested by #Tim Moore, the output to my bundle env command:
scotts-mbp:ucode scott$ bundle env
Bundler 1.6.2
Ruby 2.1.2 (2014-05-08 patchlevel 95) [x86_64-darwin13.0]
Rubygems 2.2.2
rvm 1.25.28 (stable)
GEM_HOME /Users/scott/.rvm/gems/ruby-2.1.2#rails4
GEM_PATH /Users/scott/.rvm/gems/ruby-2.1.2#rails4:/Users/scott/.rvm/gems/ruby-2.1.2#global
rubygems-bundler (1.4.4)
Bundler settings
build.nokogiri
Set for the current user (/Users/scott/.bundle/config): "\"--with-iconv-include=/usr/local/Cellar/libiconv/1.13.1/include --with-iconv-lib=/usr/local/Cellar/libiconv/1.13.1/lib\""
Gemfile
source 'http://rubygems.org'
ruby '2.1.2'
gem 'rails', '~> 4.1'
group :development do
gem 'sqlite3'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
gem 'sass-rails', '~> 4.0.3'
gem 'coffee-rails'
gem 'uglifier'
gem 'foundation-rails'
gem 'compass-rails'
gem 'jquery-rails'
gem 'jquery-rails-cdn'
gem 'turbolinks'
gem 'high_voltage'
gem 'devise'
gem 'cancan'
gem 'rolify'
gem 'liquid'
gem 'paperclip'
gem 'aws-sdk'
gem 'nokogiri'
gem 'jbuilder'
gem 'redcarpet'
gem 'kaminari'
gem 'ruby-saml-idp'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
Gemfile.lock
GEM
remote: http://rubygems.org/
specs:
actionmailer (4.1.6)
actionpack (= 4.1.6)
actionview (= 4.1.6)
mail (~> 2.5, >= 2.5.4)
actionpack (4.1.6)
actionview (= 4.1.6)
activesupport (= 4.1.6)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
actionview (4.1.6)
activesupport (= 4.1.6)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.6)
activesupport (= 4.1.6)
builder (~> 3.1)
activerecord (4.1.6)
activemodel (= 4.1.6)
activesupport (= 4.1.6)
arel (~> 5.0.0)
activesupport (4.1.6)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
arel (5.0.1.20140414130214)
aws-sdk (1.53.0)
aws-sdk-v1 (= 1.53.0)
aws-sdk-v1 (1.53.0)
json (~> 1.4)
nokogiri (>= 1.4.4)
bcrypt (3.1.7)
builder (3.2.2)
cancan (1.6.10)
chunky_png (1.3.1)
climate_control (0.0.3)
activesupport (>= 3.0)
cocaine (0.5.4)
climate_control (>= 0.0.3, < 1.0)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.3.0)
coffee-script-source
execjs
coffee-script-source (1.8.0)
compass (0.12.7)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.2.19)
compass-rails (2.0.0)
compass (>= 0.12.2)
devise (3.3.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
thread_safe (~> 0.1)
warden (~> 1.2.3)
erubis (2.7.0)
execjs (2.2.1)
foundation-rails (5.4.4.0)
railties (>= 3.1.0)
sass (>= 3.2.0)
fssm (0.2.10)
high_voltage (2.2.1)
hike (1.2.3)
i18n (0.6.11)
jbuilder (2.1.3)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (3.1.2)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-rails-cdn (1.0.3)
jquery-rails
json (1.8.1)
kaminari (0.16.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
liquid (2.6.1)
macaddr (1.7.1)
systemu (~> 2.6.2)
mail (2.6.1)
mime-types (>= 1.16, < 3)
mime-types (2.3)
mini_portile (0.6.0)
minitest (5.4.1)
multi_json (1.10.1)
nokogiri (1.6.3.1)
mini_portile (= 0.6.0)
orm_adapter (0.5.0)
paperclip (4.2.0)
activemodel (>= 3.0.0)
activesupport (>= 3.0.0)
cocaine (~> 0.5.3)
mime-types
pg (0.17.1)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.1.6)
actionmailer (= 4.1.6)
actionpack (= 4.1.6)
actionview (= 4.1.6)
activemodel (= 4.1.6)
activerecord (= 4.1.6)
activesupport (= 4.1.6)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.6)
sprockets-rails (~> 2.0)
rails_12factor (0.0.2)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.2)
rails_stdout_logging (0.0.3)
railties (4.1.6)
actionpack (= 4.1.6)
activesupport (= 4.1.6)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.3.2)
redcarpet (3.1.2)
rolify (3.4.1)
ruby-saml-idp (0.3.2)
uuid
sass (3.2.19)
sass-rails (4.0.3)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.0)
sprockets (~> 2.8, <= 2.11.0)
sprockets-rails (~> 2.0)
sprockets (2.11.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.1.4)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.9)
systemu (2.6.4)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
turbolinks (2.3.0)
coffee-rails
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.5.3)
execjs (>= 0.3.0)
json (>= 1.8.0)
uuid (2.3.7)
macaddr (~> 1.0)
warden (1.2.3)
rack (>= 1.0)
PLATFORMS
ruby
DEPENDENCIES
aws-sdk
cancan
coffee-rails
compass-rails
devise
foundation-rails
high_voltage
jbuilder
jquery-rails
jquery-rails-cdn
kaminari
liquid
nokogiri
paperclip
pg
rails (~> 4.1)
rails_12factor
redcarpet
rolify
ruby-saml-idp
sass-rails (~> 4.0.3)
sqlite3
turbolinks
uglifier
You can store the build setting in your Bundler config with:
bundle config build.nokogiri --with-iconv-include=/usr/local/Cellar/libiconv/1.13.1/include --with-iconv-lib=/usr/local/Cellar/libiconv/1.13.1/lib
See http://bundler.io/v1.6/man/bundle-config.1.html#BUILD-OPTIONS