Here is my Gemfile:
source "http://ci-stickler.com"
gemspec :name => "ci_canonical"
gemspec :name => "ci_canonical-serialization"
gem "rspec", "~> 3.0"
gem "rake", "~> 10.0"
When I am running bundle update, it is not updating the avro for ci_canonical-serialization. What am I missing here ?
I have updated the gem to 1.8.1 and installed the gem. My Gemfile.lock is generating as:
[ciuser#ci_canonical]$ head -n25 Gemfile.lock
PATH
remote: .
specs:
ci_canonical (11.0.5)
domain_model (~> 0.4)
enumerated_type (~> 0.4)
json (~> 1.6)
ci_canonical-serialization (11.0.5)
avro (~> 1.7)
ci_canonical (= 11.0.5)
GEM
remote: http://ci-stickler.com/
specs:
avro (1.8.1)
multi_json
diff-lcs (1.2.5)
docile (1.1.5)
domain_model (0.4.0)
enumerated_type (0.4.1)
json (1.8.3)
multi_json (1.12.1)
I have followed some posts but they didn't help. I am also not clear what we are specifying in Gemfile as gemspec.
Figured out answer myself. We might have multiple gems inside a single repository(could be git repository) and for all the gems, we have a .gemspec file associated which shall in turn tells about the dependencies.
So in my case, I was not modifying the second .gemspec file. Modifying it helped in resolving the problem.
Related
I am testing a new deploy on Elastic Beanstalk of a Rails application that is currently deployed on a different provider. The application deploys successfully, and can be browsed without issue.
However, if I attempt to start a console (bundle exec rails c) after ssh'ing to the environment, I get the following:
Could not find rake-12.3.1 in any of the sources
Run `bundle install` to install missing gems.
bundle list gives me all of the installed gems:
* CFPropertyList (2.3.3)
* RedCloth (4.2.9)
.
. (removed to allow it to fit into the question character limit)
.
* will_paginate-bootstrap (1.0.1)
* xml-simple (1.1.5)
* xpath (2.0.0)
bundle env gives me the following:
```
Bundler 1.16.2
Platforms ruby, x86_64-linux
Ruby 2.3.8p459 (2018-10-18 revision 65136) [x86_64-linux]
Full Path /opt/rubies/ruby-2.3.8/bin/ruby
Config Dir /opt/rubies/ruby-2.3.8/etc
RubyGems 2.7.7
Gem Home /home/ec2-user/.gem/ruby/2.3.8
Gem Path /home/ec2-user/.gem/ruby/2.3.8:/opt/rubies/ruby-2.3.8/lib/ruby/gems/2.3.0
User Path /home/ec2-user/.gem/ruby/2.3.0
Bin Dir /home/ec2-user/.gem/ruby/2.3.8/bin
Tools
Git 2.14.5
RVM not installed
rbenv not installed
chruby 0.3.9
```
## Bundler Build Metadata
```
Built At 2019-01-19
Git SHA
Released Version false
```
## Bundler settings
```
without
Set for your local app (/var/app/current/.bundle/config): [:test, :development]
Set via BUNDLE_WITHOUT: [:test, :development]
disable_shared_gems
Set via BUNDLE_DISABLE_SHARED_GEMS: true
path
Set via BUNDLE_PATH: "vendor/bundle"
```
## Gemfile
### Gemfile
```ruby
source 'https://rubygems.org'
gem 'rails', '~> 4.2.0'
gem 'rails-i18n', '~> 4.0.0'
gem 'sprockets-es6', '~> 0.9.2'
.
. (removed to allow it to fit into the question character limit)
.
PLATFORMS
ruby
DEPENDENCIES
RedCloth (~> 4.2.3)
active_scaffold!
activemodel
activerecord-session_store
acts-as-taggable-on (~> 4.0)
awesomemailer!
axlsx!
better_errors
binding_of_caller
bootstrap-editable-rails
bootstrap-growl-rails
bundler (>= 1.13.6)
byebug
calendar_date_select
capybara
carrierwave
coffee-rails
cucumber-rails
daemons (= 1.1.0)
database_cleaner
decent_exposure
delayed_job_active_record
delayed_job_groups_plugin
dynamic_form
email_spec
exception_notification
factory_girl
factory_girl_rails
faker
fog
font-awesome-rails (~> 4.5)
geokit-rails
haml-rails
html2haml
icalendar
inky-rb
intercom-rails
jquery-rails
jquery-ui-rails
less-rails (~> 3.0.0)
less-rails-bootstrap!
letter_opener
mini_magick
mocha
mysql2 (~> 0.3.0)
name_splitter
newrelic_rpm
omniauth-stripe-connect
page_title_helper
paperclip (~> 4.3)
pickle
plivo
powder
premailer-rails
protected_attributes
puma
rack (= 1.6.10)
rails (~> 4.2.0)
rails-dom-testing
rails-i18n (~> 4.0.0)
rails-jquery-autocomplete
rails-observers
rails_autolink
rake
rb-readline
recaptcha
redactor2_rails
responders
rmagick
rspec-collection_matchers
rspec-expectations
rspec-html-matchers
rspec-rails (~> 3.1)
rspec-rails-mocha!
rspec-retry
rspec_junit_formatter
rubyzip
sanitize_email
sass-rails
search_cop!
selenium-webdriver
sendgrid
sendgrid-ruby
shoulda
shoulda-matchers
simple_form
skylight
spring
spring-commands-rspec
sprockets-es6 (~> 0.9.2)
squeel
stripe
stripe-ruby-mock (~> 2.5.0)
syntax
therubyracer
thin
timecop (= 0.3.5)
truncate_html
uglifier
unicorn
validates_timeliness (~> 3.0.2)
will_paginate (~> 3.0)
will_paginate-bootstrap
xray-rails
BUNDLED WITH
1.16.1
```
And I can successfully run rake tasks: bundle exec rake cron:create_remittance_records
Using the same Gemfile and Gemfile.lock and a new rails 4.2.11 deployed using the same settings at AWS I am able to run bundle exec rails c, so it must be something in my application, but I am at a loss as to what could be effecting rails ability to load gems.
AWS support has also not been able to figure out the issue.
Any help is greatly appreciated.
My rails version is 3.2.12.
I am trying to implement gem "joyride-rails", "~> 0.0.14" in my application, but it clashes with some of my other gems. Already in my Gemfile:
gem "haml-rails", ">= 0.4"
gem 'activeadmin-mongoid', github: 'elia/activeadmin-mongoid', branch: 'active-admin-spec-suite'
When I run the bundle command, I get this error:
Bundler could not find compatible versions for gem "haml":
In Gemfile:
joyride-rails (~> 0.0.14) ruby depends on
haml (~> 3.1) ruby
haml-rails (>= 0.4) ruby depends on
haml (4.0.3)
So, if I add the gem "haml", "~> 4.0.3" the new bundle clash is:
Bundler could not find compatible versions for gem "bourbon":
In Gemfile:
joyride-rails (~> 0.0.14) ruby depends on
bourbon (~> 2.0) ruby
activeadmin-mongoid (>= 0) ruby depends on
bourbon (3.1.8)
And if I then add the gem "bourbon", "~> 3.1.8" I get this new clash:
Bundler could not find compatible versions for gem "bourbon":
In Gemfile:
joyride-rails (~> 0.0.14) ruby depends on
bourbon (~> 2.0) ruby
bourbon (3.1.8)
What to do?
Github Issue
The gem currently can't be used with the latest version of haml. (c)
I think, u can downgrade your haml version, if possible.
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 9 years ago.
I'm having trouble pushing to Heroku. Have looked around for quite a bit but haven't found a working solution. Seems like there are some missing libraries, the gemfile has sqlite under dev and test and pg under production. Here are the results of the push and the dependencies of sqlite:
Fetching: sqlite3-1.3.7.gem (100%)
Building native extensions. This could take a while...
Fetching: sqlite3-ruby-1.3.3.gem (100%)
#######################################################
Hello! The sqlite3-ruby gem has changed it's name to just sqlite3. Rather than
installing `sqlite3-ruby`, you should install `sqlite3`. Please update your
dependencies accordingly.
Thanks from the Ruby sqlite3 team!
<3 <3 <3 <3
#######################################################
Successfully installed sqlite3-1.3.7
Successfully installed sqlite3-ruby-1.3.3
2 gems installed
user-macbook:sample_app user$ git push heroku master
Counting objects: 146, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (108/108), done.
Writing objects: 100% (117/117), 17.84 KiB, done.
Total 117 (delta 50), reused 0 (delta 0)
-----> Removing .DS_Store files
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.3.0.pre.5
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Using rake (10.0.3)
Using i18n (0.6.1)
Using multi_json (1.5.0)
Using activesupport (3.2.3)
Using builder (3.0.4)
Using activemodel (3.2.3)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.3)
Using actionpack (3.2.3)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.4.4)
Using actionmailer (3.2.3)
Using arel (3.0.2)
Using tzinfo (0.3.35)
Using activerecord (3.2.3)
Using activeresource (3.2.3)
Installing annotate (2.5.0)
Installing bcrypt-ruby (3.0.1)
Installing bootstrap-sass (2.0.0)
Installing coderay (1.0.8)
Using coffee-script-source (1.4.0)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using json (1.7.5)
Using rdoc (3.12)
Using thor (0.14.6)
Using railties (3.2.3)
Using coffee-rails (3.2.2)
Using diff-lcs (1.1.3)
Installing factory_girl (2.3.2)
Installing factory_girl_rails (1.4.0)
Installing listen (0.6.0)
Installing lumberjack (1.0.2)
Installing method_source (0.8.1)
Installing slop (3.3.3)
Installing pry (0.9.10)
Installing guard (1.6.0)
Installing guard-rspec (0.5.5)
Using jquery-rails (2.0.1)
Using pg (0.12.2)
Using bundler (1.3.0.pre.5)
Using rails (3.2.3)
Using rspec-core (2.9.0)
Using rspec-expectations (2.9.1)
Using rspec-mocks (2.9.0)
Using rspec (2.9.0)
Using rspec-rails (2.9.0)
Using sass (3.2.4)
Using sass-rails (3.2.5)
Installing sqlite3 (1.3.6)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite-devel' and check your shared library search path (the
location where your sqlite3 shared library is located).
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
--enable-local
--disable-local
Gem files will remain installed in /tmp/build_3vt0kpt7q53ss/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.6 for inspection.
Results logged to /tmp/build_3vt0kpt7q53ss/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.6/ext/sqlite3/gem_make.out
An error occurred while installing sqlite3 (1.3.6), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.6'` succeeds before bundling.
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
To git#heroku.com:still-woodland-3538.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:still-woodland-3538.git'
sqlite dependencies:
Gem sqlite3-1.3.5
hoe (~> 2.12, development)
mini_portile (~> 0.2.2, development)
rake-compiler (~> 0.7.0, development)
rdoc (~> 3.10, development)
Gem sqlite3-1.3.6
hoe (~> 3.0, development)
mini_portile (~> 0.2.2, development)
rake-compiler (~> 0.7.0, development)
rdoc (~> 3.10, development)
Gem sqlite3-1.3.7
hoe (~> 3.4, development)
mini_portile (~> 0.2.2, development)
rake-compiler (~> 0.8.2, development)
rdoc (~> 3.10, development)
Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.3'
gem 'bootstrap-sass', '2.0.0'
gem 'bcrypt-ruby', '3.0.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
group :devlopment, :test do
gem 'rspec-rails', '2.9.0'
gem 'guard-rspec', '0.5.5'
gem 'sqlite3'
gem 'annotate'
gem 'factory_girl_rails', '1.4.0'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.4'
gem 'coffee-rails', '~> 3.2.2'
gem 'uglifier', '1.2.3'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platform => :ruby
end
gem 'jquery-rails', '2.0.1'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
group :test do
gem 'capybara', '1.1.2'
gem 'rspec-rails', '2.9.0'
gem 'rb-fsevent'
gem 'growl', '1.0.3'
gem 'spork', '0.9.0'
end
group :production do
gem 'pg'
end
It seems the issue is that you have a typo: group :devlopment, :test should be group :development, :test. You can see that all the gems you're using under the "devlopment" group have been installed on Heroku.
See if correcting the spelling will ensure that there's no attempt to use the sqlite3 gem (or any of the other gems in that group) in production.
Heroku doesn't support sqlite3. Instead, you should use gem pg instead.
group :production do
gem 'pg'
end
Similar to Deploying RoR app to Heroku with Sqlite3 fails
Ok, I changed my gem file
cucumber (1.0.6)
builder (>= 2.1.2)
diff-lcs (>= 1.1.2)
gherkin (~> 2.4.18)
json (>= 1.4.6)
term-ansicolor (>= 1.0.6)
cucumber-rails (1.0.6)
capybara (>= 1.1.1)
cucumber (>= 1.0.6)
nokogiri (>= 1.5.0)
But a web_steps.rb file doesn't appear? Do I need to run anything in the command line to get it to show up?
Gemfile:
cucumber (1.1.7)
builder (>= 2.1.2)
diff-lcs (>= 1.1.2)
gherkin (~> 2.8.0)
json (>= 1.4.6)
term-ansicolor (>= 1.0.6)
cucumber-rails (1.2.1)
capybara (>= 1.1.2)
cucumber (>= 1.1.3)
nokogiri (>= 1.5.0)
Thanks for the answers! But I am now getting the error?
You have requested:
cucumber = 1.0.6
The bundle currently has cucumber locked at 1.1.7.
Try running bundle update cucumber
You can install a specific version of a gem by using:
gem install <gem> -v=<version>
e.g.
gem install cucumber -v=1.1.4
Then you specify in your gemfile, that you want this specific version:
gem 'cucumber', '1.1.4'
This way your rails app should use the version you want.
Concerning your Gemfile.lock problem. Try using
bundle update
Or delete your Gemfile.lock (it will be rebuild automatically when you try to start your rails app).
Add to your Gemfile or chenge current entry to:
gem 'cucumber', '1.1.1'
where 1.1.1 is the cucumber version you want to use. Next run bundle.
Change it in your gem file. So assuming you want to use version 1.5, you would have
gem 'cucumber', '1.5'
The next thing would be to install the gem by running bundle install from the terminal
If this is because of the web_steps.rb file that got removed from cucumber, the you can add the following to your gemfile
gem "cucumber-rails-training-wheels", :group => :test
However make sure you read THIS
In a new application Rails 3.1 with only in Gemfile:
gem "omniauth"
gem "facebooker2"
bundle install give the error:
Bundler could not find compatible versions for gem "hashie":
In Gemfile:
facebooker2 (= 0.0.16) ruby depends on
hashie (~> 1.1.0) ruby
omniauth (>= 0) ruby depends on
hashie (1.2.0)
How can I install facebooker2 with omniauth?
I just ran bundle with those 2 gems and it worked.
It did install facebooker2 0.0.12 however, and not 0.0.16
gem 'omniauth', '1.0.2'
gem 'facebooker2'
it also worked without specifying the omniauth version, but I highly recommend using the a 1.0.0 release as there are huge differences. The main one being all the providers are now in their own gems.
If bundle install doesn't work, run bundle update.
The relevant sections of my Gemfile.lock:
facebooker2 (0.0.12)
mogli (>= 0.0.12)
ruby-hmac
hashie (1.2.0)
hike (1.2.1)
httparty (0.8.1)
multi_json
multi_xml
...
mogli (0.0.28)
httparty (>= 0.4.3)
omniauth (1.0.2)
hashie (~> 1.2)
rack
The only way I have to solve the problem was to clone the mogli project and update the hashie dependence to 1.2:
https://github.com/davidsf/mogli/commit/bcee3dd815bab7c8eb68511ee0d7c2da39115e14