I am deploying Rack based ruby Application in stackato. Because of local network i have downloaded all my gems locally when i try to push after some stagging i am getting the following error.
Fetching missing gems from RubyGems
staging: http://production.s3.rubygems.org/gems/bundler-1.2.1.gem:
staging: 2013-12-13 01:36:21 ERROR 504: Host production.s3.rubygems.org lookup
failed: Host not found.
staging: wget failed to fetch http://production.s3.rubygems.org/gems/bundler-1.2.1.gem
staging: /home/stackato/stackato/vcap/staging/lib/vcap/staging/plug/gemfile_task.rb:134:in `block in install_gems': Failed fetching missing gems from RubyGems (RuntimeError)
Failed to stage application:
staging plugin exited with non-zero exit code
i thought it is a Gateway error but when i go through my gem list i found
bundler (1.2.1)
if i run bundle install --local --deployment and bundle package it is successfully running the bundle. i have an rbenv here rather than rvm i tried to install bundler at global.
I don't know why it is hitting that host.
Killing my time since three days.
Help me please Thanks in advance
Update
Gemfile:
source 'http://rubygems.org'
source 'http://gemserver.portal.sb.net'
gem 'sinatra'
gem 'grape','0.6.0'
gem 'rack-fiber_pool'
gem 'haml'
gem 'hashie'
gem 'idp-utilities', require: %w(idp/test_utils/string idp/middleware/idp_url idp/logging)
gem 'idp-clients', '~> 0.1.8', require: %W(idp/middleware/clients idp/content/client idp/user/client idp/session/client idp/authentication/client idp/exceptions idp/user/exceptions)
gem "newrelic_rpm", "~> 3.6.8.168"
group :test do
gem 'page_object'
gem 'cucumber', '1.2.5'
gem 'rspec'
gem 'watir-webdriver'
gem 'childprocess'
gem 'waitforit'
gem 'httparty'
gem 'rack-test'
gem 'mirage', '3.0.0.alpha.15', require: 'mirage/client'
gem 'simplecov'
gem 'idp-user_service_mocks'
gem 'idp-content_service_mock'
end
group :development do
gem 'rake'
gem 'shotgun'
gem 'thin'
gem 'sinatra-contrib'
gem 'sinatra-reloader'
end
and my Gemfile.lock is
GEM
remote: http://rubygems.org/
remote: http://gemserver.portal.sb.net/
specs:
activesupport (4.0.1)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
addressable (2.3.5)
akami (1.2.0)
gyoku (>= 0.4.0)
nokogiri (>= 1.4.0)
atomic (1.1.14)
axiom-types (0.0.5)
descendants_tracker (~> 0.0.1)
ice_nine (~> 0.9)
backports (3.3.5)
builder (3.2.2)
childprocess (0.3.9)
ffi (~> 1.0, >= 1.0.11)
coercible (0.2.0)
backports (~> 3.0, >= 3.1.0)
descendants_tracker (~> 0.0.1)
cookiejar (0.3.0)
cucumber (1.2.5)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.11.7)
multi_json (~> 1.3)
daemons (1.1.9)
descendants_tracker (0.0.3)
diff-lcs (1.2.4)
em-http-request (1.1.1)
addressable (>= 2.3.4)
cookiejar
em-socksify (>= 0.3)
eventmachine (>= 1.0.3)
http_parser.rb (>= 0.6.0.beta.2)
em-socksify (0.3.0)
eventmachine (>= 1.0.0.beta.4)
em-synchrony (1.0.3)
eventmachine (>= 1.0.0.beta.1)
equalizer (0.0.7)
eventmachine (1.0.3)
faraday (0.8.8)
multipart-post (~> 1.2.0)
faraday_middleware (0.9.0)
faraday (>= 0.7.4, < 0.9)
ffi (1.9.3)
gherkin (2.11.8)
multi_json (~> 1.3)
grape (0.6.0)
activesupport
builder
hashie (>= 1.2.0)
multi_json (>= 1.3.2)
multi_xml (>= 0.5.2)
rack (>= 1.3.0)
rack-accept
rack-mount
virtus
gyoku (1.0.0)
builder (>= 2.1.2)
haml (4.0.4)
tilt
hashie (2.0.5)
hike (1.2.3)
http_parser.rb (0.6.0.beta.2)
httparty (0.12.0)
json (~> 1.8)
multi_xml (>= 0.5.2)
httpi (2.0.2)
rack
i18n (0.6.5)
ice_nine (0.10.0)
idp-clients (0.1.8.455)
activesupport
em-http-request
em-synchrony
faraday
faraday_middleware
savon (= 2.2.0)
idp-content_service_mock (0.0.1.495)
mirage (>= 3.0.0.alpha.10)
idp-user_service_mocks (0.1.3.460)
em-synchrony
eventmachine
idp-utilities (3.1.1.269)
childprocess
grape
net-ssh-gateway
sprockets
waitforit
watir-webdriver
json (1.8.1)
mini_portile (0.5.2)
minitest (4.7.5)
mirage (3.0.0.alpha.15)
childprocess
haml
hashie
httparty
ptools
sinatra
thor
waitforit
multi_json (1.8.2)
multi_xml (0.5.5)
multipart-post (1.2.0)
net-ssh (2.7.0)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
newrelic_rpm (3.6.8.168)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
nori (2.1.0)
page_object (2.2.0.15)
watir-webdriver
watir-webdriver
ptools (1.2.2)
rack (1.5.2)
rack-accept (0.4.5)
rack (>= 0.4)
rack-fiber_pool (0.9.3)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-protection (1.5.1)
rack
rack-test (0.6.2)
rack (>= 1.0)
rake (10.0.4)
rspec (2.13.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
rspec-core (2.13.1)
rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.1)
rubyzip (1.0.0)
savon (2.2.0)
akami (~> 1.2.0)
builder (>= 2.1.2)
gyoku (~> 1.0.0)
httpi (~> 2.0.2)
nokogiri (>= 1.4.0)
nori (~> 2.1.0)
wasabi (~> 3.1.0)
selenium-webdriver (2.37.0)
childprocess (>= 0.2.5)
multi_json (~> 1.0)
rubyzip (~> 1.0.0)
websocket (~> 1.0.4)
shotgun (0.9)
rack (>= 1.0)
simplecov (0.7.1)
multi_json (~> 1.0)
simplecov-html (~> 0.7.1)
simplecov-html (0.7.1)
sinatra (1.4.4)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
sinatra-contrib (1.4.0)
backports (>= 2.0)
eventmachine
rack-protection
rack-test
sinatra (~> 1.4.2)
tilt (~> 1.3)
sinatra-reloader (1.0)
sinatra-contrib
sprockets (2.10.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
thin (1.5.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.18.1)
thread_safe (0.1.3)
atomic
tilt (1.4.1)
tzinfo (0.3.38)
virtus (1.0.0)
axiom-types (~> 0.0.5)
coercible (~> 0.2)
descendants_tracker (~> 0.0.1)
equalizer (~> 0.0.7)
waitforit (0.0.1)
wasabi (3.1.0)
httpi (~> 2.0)
nokogiri (>= 1.4.0)
watir-webdriver (0.6.4)
selenium-webdriver (>= 2.18.0)
websocket (1.0.7)
PLATFORMS
ruby
DEPENDENCIES
childprocess
cucumber (= 1.2.5)
grape (= 0.6.0)
haml
hashie
httparty
idp-clients (~> 0.1.8)
idp-content_service_mock
idp-user_service_mocks
idp-utilities
mirage (= 3.0.0.alpha.15)
newrelic_rpm (~> 3.6.8.168)
page_object
rack-fiber_pool
rack-test
rake
rspec
shotgun
simplecov
sinatra
sinatra-contrib
sinatra-reloader
thin
waitforit
watir-webdriver
My Stackato.yml is
name: weblogin
instances: 1
framework:
type: rack
mem: 128
env:
RACK_ENV: preprod
Related
I am trying use to Kitchen/Chef to deploy. I am actually not sure if I've touched Kitchen yet.
My understanding is gem list lists all the gems in the repository, and a project fetches any gems it wants from this repository.
After I ran gem install bundler and gem install berkshelf I have a mixlib-shellout (2.2.6) shown by gem list | grep shellout.
Then I ran bundle install and based on my Gemfile, "mixlib-shellout (1.6.1)" is installed. Then I have "mixlib-shellout (2.2.6, 1.6.1)" shown by gem list | grep shellout.
From Gemfile.lock, I believe 1.6.1 is the version wanted. Then I ran berks install, an exception was thrown, which was:
Unable to activate chef-11.18.12, because mixlib-shellout-2.2.6 conflicts with mixlib-shellout (~> 1.4) - 11.18.12 - (Gem::LoadError)
I don't understand why it tries to fetch 2.2.6 instead of 1.6.1.
My Gemfile
source 'https://rubygems.org'
group :development do
gem 'berkshelf', '~> 4.0'
gem 'berkshelf-api-client', '~> 2.0'
gem 'thor'
gem 'chef', '~> 11.16'
gem 'test-kitchen', '~> 1.2'
gem 'kitchen-vagrant', '>= 0.16'
gem 'serverspec'
gem 'infrataster'
gem 'busser'
gem 'busser-serverspec'
gem 'chefspec', '~>4'
gem 'rubocop'
gem 'foodcritic'
end
gem 'chef-vault', '~> 2.2'
Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
addressable (2.3.8)
ast (2.2.0)
berkshelf (4.1.0)
addressable (~> 2.3.4)
berkshelf-api-client (~> 2.0)
buff-config (~> 1.0)
buff-extensions (~> 1.0)
buff-shell_out (~> 0.1)
celluloid (= 0.16.0)
celluloid-io (~> 0.16.1)
cleanroom (~> 1.0)
faraday (~> 0.9.0)
httpclient (~> 2.6.0)
minitar (~> 0.5.4)
octokit (~> 4.0)
retryable (~> 2.0)
ridley (~> 4.3)
solve (~> 2.0)
thor (~> 0.19)
berkshelf-api-client (2.0.0)
faraday (~> 0.9.1)
httpclient (~> 2.6.0)
buff-config (1.0.1)
buff-extensions (~> 1.0)
varia_model (~> 0.4)
buff-extensions (1.0.0)
buff-ignore (1.1.1)
buff-ruby_engine (0.1.0)
buff-shell_out (0.2.0)
buff-ruby_engine (~> 0.1.0)
busser (0.7.1)
thor (<= 0.19.0)
busser-serverspec (0.5.9)
busser
capybara (2.6.2)
addressable
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
celluloid (0.16.0)
timers (~> 4.0.0)
celluloid-io (0.16.2)
celluloid (>= 0.16.0)
nio4r (>= 1.1.0)
chef (11.18.12)
chef-zero (~> 2.2, >= 2.2.1)
diff-lcs (~> 1.2, >= 1.2.4)
erubis (~> 2.7)
ffi-yajl (~> 1.2)
highline (~> 1.6, >= 1.6.9)
mime-types (~> 1.16)
mixlib-authentication (~> 1.3)
mixlib-cli (~> 1.4)
mixlib-config (~> 2.0)
mixlib-log (~> 1.3)
mixlib-shellout (~> 1.4)
net-ssh (~> 2.6)
net-ssh-multi (~> 1.1)
ohai (~> 7.4)
plist (~> 3.1.0)
pry (~> 0.9)
rest-client (>= 1.0.4, <= 1.6.7)
chef-vault (2.7.1)
chef-zero (2.2.1)
ffi-yajl (~> 1.1)
hashie (~> 2.0)
mixlib-log (~> 1.3)
rack
chefspec (4.5.0)
chef (>= 11.14)
fauxhai (~> 3.0, >= 3.0.1)
rspec (~> 3.0)
cleanroom (1.0.0)
cliver (0.3.2)
coderay (1.1.0)
diff-lcs (1.2.5)
erubis (2.7.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
faraday_middleware (0.10.0)
faraday (>= 0.7.4, < 0.10)
fauxhai (3.1.0)
net-ssh
ffi (1.9.10)
ffi-yajl (1.4.0)
ffi (~> 1.5)
libyajl2 (~> 1.2)
foodcritic (6.0.0)
erubis
gherkin (~> 2.11)
nokogiri (>= 1.5, < 2.0)
rake
rufus-lru (~> 1.0)
treetop (~> 1.4)
yajl-ruby (~> 1.1)
gherkin (2.12.2)
multi_json (~> 1.3)
hashie (2.1.2)
highline (1.7.8)
hitimes (1.2.3)
httpclient (2.6.0.1)
infrataster (0.3.2)
capybara
faraday
faraday_middleware (>= 0.10.0)
net-ssh
net-ssh-gateway
poltergeist
rspec (>= 2.0, < 4.0)
thor
ipaddress (0.8.2)
json (1.8.3)
kitchen-vagrant (0.19.0)
test-kitchen (~> 1.4)
libyajl2 (1.2.0)
method_source (0.8.2)
mime-types (1.25.1)
mini_portile2 (2.0.0)
minitar (0.5.4)
mixlib-authentication (1.4.0)
mixlib-log
rspec-core (~> 3.2)
rspec-expectations (~> 3.2)
rspec-mocks (~> 3.2)
mixlib-cli (1.5.0)
mixlib-config (2.2.1)
mixlib-log (1.6.0)
mixlib-shellout (1.6.1)
molinillo (0.2.3)
multi_json (1.11.2)
multipart-post (2.0.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (2.9.4)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
net-ssh-multi (1.2.1)
net-ssh (>= 2.6.5)
net-ssh-gateway (>= 1.2.0)
net-telnet (0.1.1)
nio4r (1.2.1)
nokogiri (1.6.7.2)
mini_portile2 (~> 2.0.0.rc2)
octokit (4.2.0)
sawyer (~> 0.6.0, >= 0.5.3)
ohai (7.4.1)
ffi (~> 1.9)
ffi-yajl (~> 1.1)
ipaddress
mime-types (~> 1.16)
mixlib-cli
mixlib-config (~> 2.0)
mixlib-log
mixlib-shellout (~> 1.2)
systemu (~> 2.6.4)
wmi-lite (~> 1.0)
parser (2.3.0.3)
ast (~> 2.2)
plist (3.1.0)
poltergeist (1.9.0)
capybara (~> 2.1)
cliver (~> 0.3.1)
multi_json (~> 1.0)
websocket-driver (>= 0.2.0)
polyglot (0.3.5)
powerpack (0.1.1)
pry (0.10.3)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
rainbow (2.1.0)
rake (10.5.0)
rest-client (1.6.7)
mime-types (>= 1.16)
retryable (2.0.3)
ridley (4.4.1)
addressable
buff-config (~> 1.0)
buff-extensions (~> 1.0)
buff-ignore (~> 1.1)
buff-shell_out (~> 0.1)
celluloid (~> 0.16.0)
celluloid-io (~> 0.16.1)
erubis
faraday (~> 0.9.0)
hashie (>= 2.0.2, < 4.0.0)
httpclient (~> 2.6)
json (>= 1.7.7)
mixlib-authentication (>= 1.3.0)
retryable (~> 2.0)
semverse (~> 1.1)
varia_model (~> 0.4.0)
rspec (3.4.0)
rspec-core (~> 3.4.0)
rspec-expectations (~> 3.4.0)
rspec-mocks (~> 3.4.0)
rspec-core (3.4.2)
rspec-support (~> 3.4.0)
rspec-expectations (3.4.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-its (1.2.0)
rspec-core (>= 3.0.0)
rspec-expectations (>= 3.0.0)
rspec-mocks (3.4.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-support (3.4.1)
rubocop (0.37.0)
parser (>= 2.3.0.2, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 0.3)
ruby-progressbar (1.7.5)
rufus-lru (1.0.5)
safe_yaml (1.0.4)
sawyer (0.6.0)
addressable (~> 2.3.5)
faraday (~> 0.8, < 0.10)
semverse (1.2.1)
serverspec (2.29.1)
multi_json
rspec (~> 3.0)
rspec-its
specinfra (~> 2.48)
sfl (2.2)
slop (3.6.0)
solve (2.0.2)
molinillo (~> 0.2.3)
semverse (~> 1.1)
specinfra (2.50.4)
net-scp
net-ssh (>= 2.7, < 3.1)
net-telnet
sfl
systemu (2.6.5)
test-kitchen (1.4.2)
mixlib-shellout (>= 1.2, < 3.0)
net-scp (~> 1.1)
net-ssh (~> 2.7, < 2.10)
safe_yaml (~> 1.0)
thor (~> 0.18)
thor (0.19.0)
timers (4.0.4)
hitimes
treetop (1.6.3)
polyglot (~> 0.3)
unicode-display_width (0.3.1)
varia_model (0.4.1)
buff-extensions (~> 1.0)
hashie (>= 2.0.2, < 4.0.0)
websocket-driver (0.6.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
wmi-lite (1.0.0)
xpath (2.0.0)
nokogiri (~> 1.3)
yajl-ruby (1.2.1)
PLATFORMS
ruby
DEPENDENCIES
berkshelf (~> 4.0)
berkshelf-api-client (~> 2.0)
busser
busser-serverspec
chef (~> 11.16)
chef-vault (~> 2.2)
chefspec (~> 4)
foodcritic
infrataster
kitchen-vagrant (>= 0.16)
rubocop
serverspec
test-kitchen (~> 1.2)
thor
BUNDLED WITH
1.11.2
You do not want to be bundling chef-11.18.12 with test-kitchen and berkshelf. You don't need to bundle chef with those tools, and you definitely will run into issues trying to bundle chef-11 with them.
The problem with creating a Gemfile with all of your cli tools in them is that those tools never activate the entire set of gems all at once. So test-kitchen does not depend on chef, and berkshelf only recently started pulling in chef-config as a library. When you try to create a bundle you are stating that every gem must be capable of being loaded into the same ruby process with every other gem. Even for the latest set of cli tools this is something which will frequently break. If you add in chef-11.18.12 then you are picking a gem with a frozen set of gem requirements from April of last year (about 9 months ago), and its highly likely that the latest test-kitchen and berkshelf versions will pull in versions of mixlib-shellout that are incompatible with that version of chef. It gets worse because we made breaking changes to mixlib-shellout and chef-11 is forever pinned on an old branch of mixlib-shellout that is not getting updates, while test-kitchen and berkshelf have moved on.
This is why ChefDK exists which is to give a consistent set of command line tools, in something that looks superficially like a bundle, but which is not a bundle. If test-kitchen or berkshelf don't load chef into memory simultaneously, then it is fine to include different versions of those gems which may 'conflict' in their use of mixlib-shellout but will load into different ruby process just fine. Since they never all try to load into the same ruby process the 'conflict' over mixlib-shellout never becomes a real one.
Also, we do try to take a bit of care that they all load together correctly and we don't wind up with multiple versions of mixlib-shellout in the ChefDK, but sometimes this is difficult to avoid.
What you are probably trying to do is bundle everything together because you want to have the latest toolchain, but want to use chef-11 because your production is chef-11. But the issue there is that when you are using berkshelf or test-kitchen there is no requirement to use chef-11 in that ruby process that you are launching. When TK starts, it should start up a virt, and will then install chef on that virt and launch it -- you should be making sure that virt has chef-11 so you can test your cookbooks, not that your TK process is bundled with chef-11. Whatever chef gem TK is bundled with is completely irrelevant to how it operates.
If you're trying to test chef-11 with test-kitchen the right way to do that is by setting the require_chef_omnibus config parameter to "11.18.12" in your kitchen.yml file. That will cause chef-11 to get installed on the virt you are trying to provision.
+1 on the recommendation to simply start by installing ChefDK and not trying to bundle your own toolset.
It is even recommended to use chef-12 knife and ChefDK on your workstation to manage chef-11 virts/hosts. There is one gotcha where chefspec really does run on your workstation and testing chefspec against chef-12 when your production is chef-11 could allow certain kinds of failures to go undetected. You could bundle chefspec against chef-11 and do testing that way -- however, its most likely better to stick with full integration testing with test-kitchen to find those problems, and just use chefspec as quick flame tests (or not use it at all -- unit testing and mocking out your resource collection are conceptually fairly advanced topics). Until you actually hit and issue with chefspec, its best not to worry about the chef version on your workstation and just use the latest chef version for knife.
Actually i'm getting that error inside the travis build.
My Gemfile is:
source 'http://rubygems.org'
# Gemfile for youtube_dlhelper
# Add dependencies required to use your gem here.
group :default do
gem 'highline'
gem 'dir'
gem 'fileutils2'
gem 'parseconfig'
gem 'viddl-rb'
gem 'streamio-ffmpeg'
gem 'rainbow'
gem 'gli'
end
# Add dependencies to develop your gem here.
# Include everything needed to run rake, tests, features, etc.
group :development do
gem 'rdoc', '~> 4.1.0'
gem 'bundler', '~> 1.0'
gem 'jeweler', '~> 2.0.0'
gem 'yard'
gem 'gem-release'
end
group :test do
gem 'shoulda', '>= 0'
gem 'rspec'
gem 'coveralls', require: false
gem 'simplecov'
end
The Gemfile.lock:
GEM
remote: http://rubygems.org/
specs:
activesupport (4.0.2)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
addressable (2.3.5)
atomic (1.1.14)
builder (3.2.2)
coveralls (0.7.0)
multi_json (~> 1.3)
rest-client
simplecov (>= 0.7)
term-ansicolor
thor
descendants_tracker (0.0.3)
diff-lcs (1.2.5)
dir (0.1.2)
docile (1.1.1)
domain_name (0.5.15)
unf (>= 0.0.5, < 1.0.0)
faraday (0.8.8)
multipart-post (~> 1.2.0)
fileutils2 (0.2.0)
gem-release (0.7.1)
git (1.2.6)
github_api (0.11.1)
addressable (~> 2.3)
descendants_tracker (~> 0.0.1)
faraday (~> 0.8, < 0.10)
hashie (>= 1.2)
multi_json (>= 1.7.5, < 2.0)
nokogiri (~> 1.6.0)
oauth2
gli (2.8.1)
hashie (2.0.5)
highline (1.6.20)
http-cookie (1.0.2)
domain_name (~> 0.5)
httpauth (0.2.0)
i18n (0.6.9)
jeweler (2.0.0)
builder
bundler (>= 1.0)
git (>= 1.2.5)
github_api
highline (>= 1.6.15)
nokogiri (>= 1.5.10)
rake
rdoc
json (1.8.1)
jwt (0.1.8)
multi_json (>= 1.5)
mechanize (2.7.3)
domain_name (~> 0.5, >= 0.5.1)
http-cookie (~> 1.0)
mime-types (~> 2.0)
net-http-digest_auth (~> 1.1, >= 1.1.1)
net-http-persistent (~> 2.5, >= 2.5.2)
nokogiri (~> 1.4)
ntlm-http (~> 0.1, >= 0.1.1)
webrobots (>= 0.0.9, < 0.2)
mime-types (2.0)
mini_portile (0.5.2)
minitest (4.7.5)
multi_json (1.8.2)
multi_xml (0.5.5)
multipart-post (1.2.0)
net-http-digest_auth (1.4)
net-http-persistent (2.9)
nokogiri (1.6.1)
mini_portile (~> 0.5.0)
ntlm-http (0.1.1)
oauth2 (0.9.2)
faraday (~> 0.8)
httpauth (~> 0.2)
jwt (~> 0.1.4)
multi_json (~> 1.0)
multi_xml (~> 0.5)
rack (~> 1.2)
parseconfig (1.0.4)
progressbar (0.21.0)
rack (1.5.2)
rainbow (1.99.1)
rake (10.1.1)
rdoc (4.1.0)
json (~> 1.4)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.7)
rspec-expectations (2.14.4)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.4)
shoulda (3.5.0)
shoulda-context (~> 1.0, >= 1.0.1)
shoulda-matchers (>= 1.4.1, < 3.0)
shoulda-context (1.1.6)
shoulda-matchers (2.4.0)
activesupport (>= 3.0.0)
simplecov (0.8.2)
docile (~> 1.1.0)
multi_json
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
streamio-ffmpeg (1.0.0)
term-ansicolor (1.2.2)
tins (~> 0.8)
thor (0.18.1)
thread_safe (0.1.3)
atomic
tins (0.13.1)
tzinfo (0.3.38)
unf (0.1.3)
unf_ext
unf_ext (0.0.6)
viddl-rb (0.79)
mechanize
nokogiri
progressbar
webrobots (0.1.1)
yard (0.8.7.3)
PLATFORMS
ruby
DEPENDENCIES
bundler (~> 1.0)
coveralls
dir
fileutils2
gem-release
gli
highline
jeweler (~> 2.0.0)
parseconfig
rainbow
rdoc (~> 4.1.0)
rspec
shoulda
simplecov
streamio-ffmpeg
viddl-rb
yard
I searched inside Stackoverflow and found mostly the answer to make a bundle install or remove the lock and bundle install again.
Also i tried out to use bundle install -deployment but that one uses all dependencies, and my *.gem is ~60M big (by using rake release).
Is there a better solution?
I've found the solution. The problem was, that i have overwritten the install section of .travis.yml. So bundle install aren't executed and it doesn't found it.
So the fix:
from
install:
- sudo apt-get install ubuntu-restricted-extras ffmpeg
to
before_install:
- sudo apt-get install ubuntu-restricted-extras ffmpeg
I'm working on a Gem.
Despite specifying the version of activemodel, the gem is actually using activemodel 4.0.0.
As of 4.0.0 the constructor only takes a single argument. So when I try and pass in a second argument I get an Argument error:
/Users/me/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activerecord-4.0.0/lib/active_record/core.rb:180:in `initialize': wrong number of arguments (2 for 1) (ArgumentError)
Why is Rubygems using the wrong version of ActiveModel?
I have specified the following dependencies in the gemspec:
gem.add_dependency "log4r"
gem.add_dependency "deep_end"
gem.add_dependency "google_drive"
gem.add_development_dependency 'rake'
gem.add_development_dependency 'rspec'
gem.add_development_dependency "activemodel", "3.2.13"
gem.add_development_dependency "activerecord", "3.2.13"
gem.add_development_dependency "activesupport", "3.2.13"
My Gemfile.lock looks like this:
PATH
remote: .
specs:
drive_time (0.0.1)
deep_end
google_drive
log4r
GEM
remote: https://rubygems.org/
specs:
activemodel (3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
activerecord (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activesupport (3.2.13)
i18n (= 0.6.1)
multi_json (~> 1.0)
arel (3.0.2)
builder (3.0.4)
deep_end (0.0.1)
log4r
diff-lcs (1.2.4)
faraday (0.8.7)
multipart-post (~> 1.1)
google_drive (0.3.6)
nokogiri (>= 1.4.4, != 1.5.2, != 1.5.1)
oauth (>= 0.3.6)
oauth2 (>= 0.5.0)
httpauth (0.2.0)
i18n (0.6.1)
jwt (0.1.8)
multi_json (>= 1.5)
log4r (1.1.10)
mini_portile (0.5.0)
multi_json (1.7.7)
multi_xml (0.5.4)
multipart-post (1.2.0)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
oauth (0.4.7)
oauth2 (0.9.2)
faraday (~> 0.8)
httpauth (~> 0.2)
jwt (~> 0.1.4)
multi_json (~> 1.0)
multi_xml (~> 0.5)
rack (~> 1.2)
rack (1.5.2)
rake (10.1.0)
rspec (2.13.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
rspec-core (2.13.1)
rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.1)
tzinfo (0.3.37)
PLATFORMS
ruby
DEPENDENCIES
activerecord (= 3.2.13)
activesupport (= 3.2.13)
drive_time!
rake
rspec
I also get the following:
$ bundle show activemodel #/Users/pedr/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activemodel-3.2.13
Make sure you are running your code with bundle exec, otherwise ruby will default to using the most recent version of the gem you have installed.
Using bundle exec will disallow loading of any gems not in your bundle and should correct your problem. Check out the manpage for more details.
Hope this helps!
After trying everything I could think of, the following has done the trick (though whether it has permanently cured the issue, only time will tell).
$ gem clean
Uninstall rbenv
Install rbenv
Delete Gemfile.lock
$ bundle
So i just updated the JRUBY to 1.7.3 [1.9] and did a fresh gem install for the 1.9 version of ruby.
Here are the versions of my activerecord gems:
activerecord (1.6.0)
activerecord-jdbc-adapter (1.2.9)
ActiveRecord-JDBC (0.5)
activesupport (3.2.13)
When i try to execute a database statement i get the following error
activerecord-jdbc-adapter requires ActiveRecord at runtime
no such file to load -- active_record/version (LoadError)
anyone know what's going on? I have verified by using jgem list that these gems are all installed
Gemfile.lock
GEM
remote: http://rubygems.org/
specs:
ActiveRecord-JDBC (0.5)
Ascii85 (1.0.2)
activerecord (1.6.0)
activerecord-jdbc-adapter (1.2.9)
activesupport (3.2.13)
i18n (= 0.6.1)
multi_json (~> 1.0)
afm (0.2.0)
akami (1.2.0)
gyoku (>= 0.4.0)
nokogiri (>= 1.4.0)
bouncy-castle-java (1.5.0147)
builder (3.2.0)
business_time (0.6.1)
activesupport (>= 3.1.0)
tzinfo (~> 0.3.31)
childprocess (0.3.9)
ffi (~> 1.0, >= 1.0.11)
cucumber (1.2.3)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.11.6)
multi_json (~> 1.3)
cuke_sniffer (0.0.3)
roxml
data_magic (0.14)
faker (>= 1.1.2)
yml_reader (>= 0.2)
diff-lcs (1.2.1)
faker (1.1.2)
i18n (~> 0.5)
ffi (1.6.0)
gherkin (2.11.6-java)
json (>= 1.7.6)
gyoku (1.0.0)
builder (>= 2.1.2)
hashery (2.1.0)
httpi (2.0.2)
rack
i18n (0.6.1)
jruby-openssl (0.8.7)
bouncy-castle-java (>= 1.5.0147)
jruby-win32ole (0.8.5)
json (1.7.7-java)
mime-types (1.21)
multi_json (1.7.2)
nokogiri (1.5.9-java)
nori (2.0.4)
page-object (0.8.6.1)
page_navigation (>= 0.7)
selenium-webdriver (>= 2.31.0)
watir-webdriver (>= 0.6.2)
page_navigation (0.7)
data_magic (>= 0.14)
pdf-reader (1.3.2)
Ascii85 (~> 1.0.0)
afm (~> 0.2.0)
hashery (~> 2.0)
ruby-rc4
ttfunk
rack (1.5.2)
rake (10.0.4)
rautomation (0.8.0)
ffi
rest-client (1.6.7)
mime-types (>= 1.16)
roxml (3.3.1)
activesupport (>= 2.3.0)
nokogiri (>= 1.3.3)
rspec (2.13.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
rspec-core (2.13.1)
rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.0)
ruby-debug-ide (0.4.16)
rake (>= 0.8.1)
ruby-ole (1.2.11.6)
ruby-rc4 (0.1.5)
rubyzip (0.9.9)
savon (2.1.0)
akami (~> 1.2.0)
builder (>= 2.1.2)
gyoku (~> 1.0.0)
httpi (~> 2.0.2)
nokogiri (>= 1.4.0)
nori (~> 2.0.3)
wasabi (~> 3.0.0)
selenium-webdriver (2.31.0)
childprocess (>= 0.2.5)
multi_json (~> 1.0)
rubyzip
websocket (~> 1.0.4)
sources (0.0.1)
spreadsheet (0.8.3)
ruby-ole (>= 1.0)
ttfunk (1.0.3)
tzinfo (0.3.37)
wasabi (3.0.0)
httpi (~> 2.0)
nokogiri (>= 1.4.0)
watir-webdriver (0.6.2)
selenium-webdriver (>= 2.18.0)
websocket (1.0.7)
xpath (1.0.0)
nokogiri (~> 1.3)
yml_reader (0.2)
PLATFORMS
java
DEPENDENCIES
ActiveRecord-JDBC
activerecord
activerecord-jdbc-adapter
builder
business_time
childprocess
cucumber
cuke_sniffer
ffi
gherkin
jruby-openssl
jruby-win32ole
json
mime-types
nokogiri
page-object
pdf-reader
rake
rautomation
rest-client
rspec
ruby-debug-ide
rubyzip
savon
selenium-webdriver
sources
spreadsheet
watir-webdriver
xpath
The first issue was your require statement,
Your second issue was using 1.6.0 which has been reported to throw this error. The solution is to remove AR 1.6.0 from your Gemfile.lock and install a newer version.
In your Gemfile add:
gem "activerecord", "~> 3.2.13"
then re-run bundler after fixing your Gemfile.lock
I want to use Metrical with my brand-new Rails project using Ruby 1.9 hash syntax doing things like
before_filter :guest_user, only: [:new, :create]
before_filter :correct_user, only: :destroy
and I get this error:
/Users/xxx/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/racc/parser.rb:351:in `on_error': (Racc::ParseError)
parse error on value ":" (tCOLON)
I did a bit of investigation and found out that the ruby_parser gem does not support 1.9 hash syntax (see github issue) - not knowing which version that refers to I've tried to update the ruby_parser gem to 2.3.1 which doesn't work because some of the code quality tools included in metrical require 2.0 versions of ruby_parser.
Is there any way to solve this (besides rolling back to the old syntax)? I'm also a bit puzzled because a couple of the code quality tools seem rather outdated, checking on RubyToolBox confirmed this impression. Or am I missing something fundamental here?
(Here's my Gemfile.lock for reference):
GEM
remote: https://rubygems.org/
specs:
Saikuro (1.1.0)
actionmailer (3.2.6)
actionpack (= 3.2.6)
mail (~> 2.4.4)
actionpack (3.2.6)
activemodel (= 3.2.6)
activesupport (= 3.2.6)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.1)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.1.3)
activemodel (3.2.6)
activesupport (= 3.2.6)
builder (~> 3.0.0)
activerecord (3.2.6)
activemodel (= 3.2.6)
activesupport (= 3.2.6)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.6)
activemodel (= 3.2.6)
activesupport (= 3.2.6)
activesupport (3.2.6)
i18n (~> 0.6)
multi_json (~> 1.0)
addressable (2.2.8)
arel (3.0.2)
arrayfields (4.7.4)
awesome_print (1.0.2)
bcrypt-ruby (3.0.1)
bootstrap-sass (2.0.4.0)
bootstrap-will_paginate (0.0.7)
will_paginate
builder (3.0.0)
capybara (1.1.2)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
childprocess (0.3.4)
ffi (~> 1.0, >= 1.0.6)
chronic (0.3.0)
churn (0.0.13)
chronic (>= 0.2.3)
hirb
json_pure
main
ruby_parser (~> 2.0.4)
sexp_processor (~> 3.0.3)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.3.3)
colored (1.2)
cucumber (1.2.1)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.11.0)
json (>= 1.4.6)
cucumber-rails (1.3.0)
capybara (>= 1.1.2)
cucumber (>= 1.1.8)
nokogiri (>= 1.5.0)
database_cleaner (0.7.2)
diff-lcs (1.1.3)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
factory_girl (3.5.0)
activesupport (>= 3.0.0)
factory_girl_rails (3.5.0)
factory_girl (~> 3.5.0)
railties (>= 3.0.0)
faker (1.0.1)
i18n (~> 0.4)
fattr (2.2.1)
ffi (1.1.0)
flay (1.4.3)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
flog (2.5.3)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
gherkin (2.11.1)
json (>= 1.4.6)
growl (1.0.3)
guard (1.2.3)
listen (>= 0.4.2)
thor (>= 0.14.6)
guard-rspec (1.2.0)
guard (>= 1.1)
guard-spork (1.1.0)
guard (>= 1.1)
spork (>= 0.8.4)
hike (1.2.1)
hirb (0.7.0)
i18n (0.6.0)
journey (1.0.4)
jquery-rails (2.0.2)
railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
json (1.7.3)
json_pure (1.7.3)
launchy (2.1.0)
addressable (~> 2.2.6)
libwebsocket (0.1.4)
addressable
listen (0.4.7)
rb-fchange (~> 0.0.5)
rb-fsevent (~> 0.9.1)
rb-inotify (~> 0.8.8)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
main (4.7.1)
map (6.2.0)
metric_fu (2.1.1)
Saikuro (>= 1.1.0)
activesupport (>= 2.0.0)
chronic (~> 0.3.0)
churn (>= 0.0.7)
flay (>= 1.2.1)
flog (>= 2.3.0)
rails_best_practices (>= 0.6.4)
rcov (>= 0.8.3.3)
reek (>= 1.2.6)
roodi (>= 2.1.0)
syntax
metrical (0.1.0)
metric_fu (~> 2.1.1)
rcov (~> 0.9)
mime-types (1.19)
multi_json (1.3.6)
nokogiri (1.5.5)
pg (0.14.0)
polyglot (0.3.3)
progressbar (0.11.0)
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.2.6)
actionmailer (= 3.2.6)
actionpack (= 3.2.6)
activerecord (= 3.2.6)
activeresource (= 3.2.6)
activesupport (= 3.2.6)
bundler (~> 1.0)
railties (= 3.2.6)
rails_best_practices (1.10.1)
activesupport
awesome_print
colored
erubis
i18n
progressbar
sexp_processor
railties (3.2.6)
actionpack (= 3.2.6)
activesupport (= 3.2.6)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (0.9.2.2)
rb-fchange (0.0.5)
ffi
rb-fsevent (0.9.1)
rb-inotify (0.8.8)
ffi (>= 0.5.0)
rcov (0.9.11)
rdoc (3.12)
json (~> 1.4)
reek (1.2.12)
ripper_ruby_parser (~> 0.0.7)
ruby2ruby (~> 1.2.5)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
ripper_ruby_parser (0.0.8)
sexp_processor (~> 3.0)
roodi (2.1.0)
ruby_parser
rspec (2.11.0)
rspec-core (~> 2.11.0)
rspec-expectations (~> 2.11.0)
rspec-mocks (~> 2.11.0)
rspec-core (2.11.1)
rspec-expectations (2.11.1)
diff-lcs (~> 1.1.3)
rspec-mocks (2.11.1)
rspec-rails (2.11.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec (~> 2.11.0)
ruby2ruby (1.2.5)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
ruby_parser (2.0.6)
sexp_processor (~> 3.0)
rubyzip (0.9.9)
sass (3.1.20)
sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
selenium-webdriver (2.25.0)
childprocess (>= 0.2.5)
libwebsocket (~> 0.1.3)
multi_json (~> 1.0)
rubyzip
sexp_processor (3.0.10)
simplecov (0.6.4)
multi_json (~> 1.0)
simplecov-html (~> 0.5.3)
simplecov-html (0.5.3)
spork (0.9.2)
sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.6)
syntax (1.0.0)
thor (0.15.4)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.33)
uglifier (1.2.6)
execjs (>= 0.3.0)
multi_json (~> 1.3)
will_paginate (3.0.3)
xpath (0.1.4)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
arrayfields
bcrypt-ruby
bootstrap-sass
bootstrap-will_paginate
capybara
coffee-rails
cucumber-rails
database_cleaner
factory_girl_rails
faker
fattr
growl
guard-rspec
guard-spork
jquery-rails
launchy
map
metrical
pg
rails (= 3.2.6)
rb-fsevent
rspec-rails
sass-rails
simplecov
spork
sqlite3
uglifier
will_paginate
After doing some more research on this issue and under the impression that ruby_parser wouldn't be updated for a while (watching https://github.com/seattlerb/ruby_parser though) I've decided to finally go for the nasty hack to replace my ruby hashes with the old syntax. I wrote a rake task for that such that it's easy to replace them all in one run, run metrical and then revert them back to their nice 1.9 hash syntax.
https://github.com/bkleinen/hash-reverter
Update: apparently, ruby_parser will be updated with version 3.0.0, but most of the tools depend on older versions.