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
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.
I'm a noob to run gem dependencies. I get this error when trying to run a ruby program
.rbenv/versions/2.1.5/lib/ruby/2.1.0/rubygems/specification.rb:2064:in `raise_if_conflicts': Unable to activate familysearch-0.4.2, because faraday-0.9.1 conflicts with faraday (~> 0.8.4), multi_json-1.11.2 conflicts with multi_json (~> 1.5.0) (Gem::LoadError)
In trouble shooting, I installed Bundler. Here is what my lock file looks like:
GEM
remote: https://rubygems.org/
specs:
mini_portile (0.6.2)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
rack (1.6.4)
PLATFORMS
ruby
DEPENDENCIES
faraday (~> 0.9.1)
nokogiri
rack (~> 1.1)
BUNDLED WITH
1.10.5
I found similar stuff over the webs and their solutions. Unfortunately, none of these worked for me. Thank you for looking :)
The gem you're having issues with, familysearch-0.4.2, hasn't been updated since March of 2014. Hence, it's dependent on old gem versions.
I'd recommend submitting an issue to the Gem created, jimmyz, on Github via https://github.com/jimmyz/familysearch-rb/issues/new.
While the VCR tests for the gem aren't working (so I couldn't check my work), try using my forked version of the gem below where I updated the dependencies.
gem "familysearch", git: 'https://github.com/acpk/familysearch-rb.git'
FullCalendar stopped working after I upgraded some gems. I needed to add 'google-api-client' to the Gemfile and the Bundle Install process gave me the following message:
itsjustme#rubberroom:~/Projects/FunnyFarm$ bundle
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/..
Bundler could not find compatible versions for gem "faraday":
In snapshot (Gemfile.lock):
faraday (0.8.0)
In Gemfile:
google-api-client (>= 0.5.0) ruby depends on
faraday (~> 0.8.1) ruby
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
Following instructions, I issued a Bundle Update. This was the result:
itsjustme#rubberroom:~/Projects/FunnyFarm$ bundle update
Fetching gem metadata from https://rubygems.org/.....
Error Bundler::HTTPError during request to dependency API
Fetching full source index from https://rubygems.org/
Using rake (10.0.2)
Using i18n (0.6.1)
Using multi_json (1.3.7)
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 addressable (2.3.2)
Installing extlib (0.9.15)
Installing autoparse (0.3.2)
Using bcrypt-ruby (3.0.1)
Using bundler (1.2.2)
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 multipart-post (1.1.5)
Using faraday (0.8.4)
Using jwt (0.1.5)
Installing launchy (2.1.2)
Installing signet (0.4.3)
Installing uuidtools (2.1.3)
Installing google-api-client (0.5.0)
Using haml (3.1.7)
Using httpauth (0.2.0)
Using jquery-rails (2.1.3)
Using libv8 (3.3.10.4)
Using mobilepronto (0.3.2)
Using mysql2 (0.3.11)
Using oauth (0.4.7)
Using oauth2 (0.6.1)
Using rails (3.2.3)
Using sass (3.2.3)
Using sass-rails (3.2.5)
Using sorcery (0.7.13)
Using sqlite3 (1.3.6)
Using therubyracer (0.10.2)
Using uglifier (1.3.0)
Your bundle is updated! Use `bundle show [gemname]` to see where a bundled gem
is installed.
Neither CSS nor jQuery files were modified and, being new to RoR, I have no idea where to start looking for a solution.
Screenshots
This is a screenshot taken before the update:
http://pic.twitter.com/85gUGSg3
This one, after the update:
http://pic.twitter.com/rYvIhsbe
Files
The view is too simple to make a difference. But here it is, anyway (show.html.haml):
%h4 Agenda dos Médicos
#calendar
Similarly, the controller is almost empty. It just points to the view.
class WorkSchedsController < ApplicationController
before_filter :require_login
def show
end
end
The magic of it all happens thanks to fullcalendar.js, configured as follows:
$(document).ready(function() {
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
eventSources: [
// Dr. John Doe
{
url: 'https://www.google.com/calendar/feeds/userthis%40gmail.com/private-blah/basic',
color: 'dodgerblue'
},
// Dr. Jane Doe
{
url: 'https://www.google.com/calendar/feeds/userthat%40gmail.com/private-blah/basic',
color: 'brown'
},
// Code abbreviated
{
...
}
]
});
});
For the sake of completeness, this is the Gemfile, before the adding 'fullcalendar-rails' (as suggested by Mr. Durrant):
source 'https://rubygems.org'
gem 'rails', '3.2.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
gem 'sorcery'
gem 'mobilepronto'
gem 'execjs'
gem 'therubyracer'
gem 'mysql2'
gem 'haml'
gem 'sass'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
Seems the table which sets the calendar has been flattened.
Can anyone help? Give some pointers or something?
What I see on your screenshots , it reminds me of the nightmare I had in the hot summer days . I have added a class in the .css.scss file , but forgot to close it (one little '}'). No matter I've tried it was a pain and sorrow in various tempos .
In your case I would focus in searching for inconsistent stylesheet , related with the tag "tbody" . It seems all the other css and js are OK . Keep us updated , sir .
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
Ok i keep getting this error
Could not find tzinfo-0.3.24 in any of the sources (Bundler::GemNotFound)
I am using rvm and i just created a gemset and i have this
gem list
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.0.3)
actionpack (3.0.3)
activemodel (3.0.3)
activerecord (3.0.3)
activeresource (3.0.3)
activesupport (3.0.3)
arel (2.0.7)
bcrypt-ruby (2.1.4)
builder (2.1.2)
bundler (1.0.7)
devise (1.1.5)
erubis (2.6.6)
i18n (0.5.0)
mail (2.2.14)
mime-types (1.16)
mysql (2.8.1)
paperclip (2.3.8)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack-test (0.5.7)
rails (3.0.3)
railties (3.0.3)
rake (0.8.7)
riddle (1.2.2)
thinking-sphinx (2.0.0)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.24)
warden (1.0.3)
will_paginate (3.0.pre2)
and my Gemfile is
source 'http://rubygems.org'
gem 'rails', '3.0.3'
gem 'mysql'
gem 'devise'
gem 'thinking-sphinx', '2.0.0', :require => 'thinking_sphinx'
gem "paperclip", "~> 2.3"
gem "will_paginate", "~> 3.0.pre2"
any ideas...it was working fine till today
Try including tzinfo-0.3.24 in your Gemfile and doing bundle exec with the command that gives you the error. Alternatively you could bundle install --development to get the Gems in the vendor folder. Let us know how you get on.
After DLL Hell we have Gem Hell. It looks like we have the same dependency hell in Ruby as in other communities. Welcome :-)
The gem tzinfo with the right version 0.3.24 seems to be missing, or it is not referenced correctly in your Gemfile. Check your Gemfile and your Gemfile.lock. The latter is useful to find out dependencies, and it should be updated if the Gemfile is changed (by running a bundle install).
If you have installed the gems locally, by using gem install --user-install gemname or bundle install --path ~/.gem, then you maybe have multiple gems in multiple locations. Check out the GEM PATHS by calling a gem env command from the command line.
And by the way, you seem to use Rails 3.0.x with the old mysql gem. The mysql2 gem is now the default in Rails 3. I would recommend to use the mysql2 gem instead by adding gem 'mysql2' to the GemFile and by using using the mysql2 adapter in your database.yml.