I want deploy the sample project of rails3 in action.When i run 'bundle install',it tells me that remote error: Repository not found.I am new to git,github and rails3.but i have alreay created a github account and config git and github well.i do not know what happend.i will be very thankful if anything can help!
Here is the console message(ubuntu 12.04LST):
magic#magic-ThinkPad-T430u:~/文档/rails/ticketee-book$ bundle
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/..
Fetching git://github.com/radar/rack-test
fatal: remote error: Repository not found.
Git error: command `git clone 'git://github.com/radar/rack-test'
"/home/magic/.rvm/gems/ruby-1.9.3-p392#rails3.2/cache/bundler/git/rack-test-
8ce034d275474b0b137179c1bd5be3e5ee2e2464"
--bare --no-hardlinks` in directory /home/magic/文档/rails/ticketee-book has failed.
Here is the gemfile:
source 'http://rubygems.org'
gem 'rails', :git => "git://github.com/rails/rails", :branch => "3-1-stable"
# gem 'arel', :git => 'git://github.com/rails/arel.git'
gem 'rack'
gem 'sprockets', :git => "git://github.com/sstephenson/sprockets.git"
gem 'sqlite3'
gem 'sass', '~> 3.1.0.alpha'
gem 'coffee-script'
gem 'dynamic_form'
gem 'devise', :git => "git://github.com/plataformatec/devise.git"
gem 'cancan'
gem 'paperclip', :git => "git://github.com/thoughtbot/paperclip.git"
gem 'searcher'
gem 'kaminari'
gem 'jquery-rails'
gem "oa-oauth", :require => "omniauth/oauth"
gem "delayed_job"
# gem "forem", :git => "git://github.com/radar/forem"
gem "ticketee-forem", :require => "forem", :path => "../forem"
gem 'sinatra'
group :test, :development do
gem 'gmail'
gem 'rspec-rails', '~> 2.6.1.beta1'
end
group :test do
gem 'rack-test', :git => "git://github.com/radar/rack-test"
gem 'cucumber-rails', :git => "git://github.com/cucumber/cucumber-rails"
gem 'capybara'
gem 'database_cleaner'
gem 'factory_girl'
gem 'email_spec'
gem 'launchy'
end
group :production do
gem 'pg'
end
In your Gemfile, in the test group, you have the following line
gem 'rack-test', :git => "git://github.com/radar/rack-test"
It will instruct bundler to clone the repository and use its contents as a gem. As the repository doesn't exist on Github anymore, the bundle fails.
You should edit your Gemfile and either use the new repository location or use the published gem from rubygems.org. In the end, you have to edit your gemfile to use one of the following alternatives:
gem 'rack-test', :git => "https://github.com/brynary/rack-test.git"
# or
gem "rack-test"
No, the problem is that the repository is not there anymore. try by downloading repository on a new address:
git clone git://github.com/brynary/rack-test.git
Now after cloning has done, in terminal do:
cd rack-test
And now you are in very directory you created when you did git clone and then try to run command:
bundle install --path vendor/bundle
And everything should work
Related
I just did a fresh install of mavricks, Postgres.app, RVM, Git.
I created a standard new rails app and everything worked fine.
However when I tried to grab a project from github and can not get bundle install to run.
d3 git:(master) bundle install
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Updating git://github.com/thomas-mcdonald/bootstrap-sass.git
fatal: Could not parse object '9c6c07f74ff515cf38380b014cfede14a4f0eae4'.
Git error: command `git reset --hard 9c6c07f74ff515cf38380b014cfede14a4f0eae4`
in directory
/Users/tyler/.rvm/gems/ruby-1.9.3-p448#d3/bundler/gems/bootstrap-sass-9c6c07f74ff5
has failed.
If this error persists you could try removing the cache directory
'/Users/tyler/.rvm/gems/ruby-1.9.3-p448#d3/cache/bundler/git/bootstrap-sass-33efd1d8ffb6176fdb805029a30f02a6edfbae2e'
I tried to remove the project and clone it again.
I tried removing the gemset and removing all the gems from the gemset.
I also tried to follow the error message and remove the cache folder.
Please help I really need to get back to working on this project.
Update:
I just tried a bundle update as well.
➜ d3 git:(master) bundle update
Updating git://github.com/thomas-mcdonald/bootstrap-sass.git
fatal: ambiguous argument '3': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Git error: command `git rev-parse 3` in directory
/Users/tyler/.rvm/gems/ruby-1.9.3-p448#d3/cache/bundler/git/bootstrap-sass-33efd1d8ffb6176fdb805029a30f02a6edfbae2e
has failed.
If this error persists you could try removing the cache directory
'/Users/tyler/.rvm/gems/ruby-1.9.3-p448#d3/cache/bundler/git/bootstrap-sass-33efd1d8ffb6176fdb805029a30f02a6edfbae2e'
Update
source 'https://rubygems.org'
ruby '1.9.3'
gem 'rails', '3.2.15'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'pg'
gem 'thin'
gem 'unicorn'
gem 'newrelic_rpm'
gem 'mixpanel-ruby'
# Gems used only for assets and not required
# in production environments by default.
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'jquery-rails'
gem 'bootstrap-sass', :git => 'git://github.com/thomas-mcdonald/bootstrap-sass.git', :branch => '3'
gem "font-awesome-rails"
gem 'haml_coffee_assets'
gem 'execjs'
group :development, :test do
gem 'jasmine-rails'
gem "letter_opener"
gem 'pry-rails'
gem 'rspec-rails'
gem 'capybara'
gem 'spin'
end
gem 'active_link_to'
gem 'acts_as_list'
gem "aws-sdk"
gem 'backbone-on-rails'
gem 'browser'
gem 'devise'
gem 'gon'
gem 'js-routes'
gem 'oj'
gem 'pusher'
gem 'rabl'
gem 'simple_form'
There is no branch 3 in https://github.com/thomas-mcdonald/bootstrap-sass/ anymore. That's why Git is complaining. So you need to change it from:
gem 'bootstrap-sass', :github => 'git://github.com/thomas-mcdonald/bootstrap-sass.git', :branch => '3'
to:
gem 'bootstrap-sass', :git => 'git://github.com/thomas-mcdonald/bootstrap-sass.git'
or use a shorthand syntax:
gem 'bootstrap-sass', :github => 'thomas-mcdonald/bootstrap-sass'
The following console logs should describe the issue
bundle install
Could not find multi_json-1.1.0 in any of the sources
Run `bundle install` to install missing gems.
bundle install asks me to bundle install.
Have tried: https://github.com/mpapis/rubygems-bundler/issues/4
Looked at: https://github.com/carlhuda/bundler/issues/865
Not sure where to go next.
Also of interest, if we comment all the gems from inside vendor/gems the bundle works fine.
source 'http://rubygems.org'
gem 'rails', '~> 3.2.2'
gem 'mysql2'
gem 'thin'
# Asset template engines
gem 'coffee-script'
gem 'uglifier'
gem 'sprockets'
gem 'less-js'
gem 'execjs'
gem 'nokogiri'
gem 'lucy'
gem 'babilu'
gem 'simple_form'
gem 'mechanize'
gem 'geoip'
gem 'less'
gem 'bb-ruby'
gem 'client_side_validations', "~> 3.2.0.beta.2"
gem 'client_side_validations-simple_form'
gem 'require_all'
#for avatars
gem 'paperclip'
gem 'rmagick'
gem "multipart-post"
gem 'gibberish'
# Memcached client
gem 'dalli'
#to support tables without auto-incrementing primary keys
gem 'composite_primary_keys', "~> 5.0.1"
gem 'calendar_helper', :require => 'calendar_helper'
gem 'jquery-rails'
gem 'capistrano'
gem 'capistrano-ext'
gem 'simple_form'
gem 'htmlentities'
gem 'will_paginate'
gem 'airbrake', :path => "vendor/gems/airbrake"
gem "uservoice", :path => "vendor/gems/uservoice"
# For spambots
gem "honeypot-captcha"
# Internationalization GUI
gem "tolk", :git => "http://github.com/miloops/tolk.git", :branch => "rails31"
gem "will-paginate-i18n"
gem "omniauth"
gem "omniauth-facebook"
gem "omniauth-justintv", :git => 'http://github.com/themindoverall/omniauth-justintv.git'
gem 'oauth'
gem 'rails-i18n'
# For rate limiting
gem "rack-throttle", :path => "vendor/gems/rack-throttle"
gem "xfire-api", :path => "vendor/gems/xfire-api"
gem "anametrix", :path => "vendor/gems/anametrix"
#To make ruby debug work see: http://stackoverflow.com/questions/6438116/rails-with-ruby-debugger-throw-symbol-not-found-ruby-current-thread-loaderro
group :development, :test do
#gem 'ruby-debug-base19', '0.11.26', :path => "~/.rvm/gems/ruby-1.9.3-p#{RUBY_PATCHLEVEL}/gems/ruby-debug-base19-0.11.26/"
#gem 'linecache19', '0.5.13', :path => "~/.rvm/gems/ruby-1.9.3-p#{RUBY_PATCHLEVEL}/gems/linecache19-0.5.13/"
#gem 'ruby-debug19', :require => 'ruby-debug'
gem 'ruby_parser'
end
group :test do
gem 'ruby-prof'
gem 'test-unit' # For performance testing
gem 'turn', :require => false
gem 'factory_girl_rails', "~> 1.0.1"
gem 'capybara', "~> 1.0.0"
gem 'database_cleaner', '~> 0.6.7'
gem 'rspec-rails', "~> 2.6.1"
gem 'cucumber-rails', "~> 1.0.0"
gem 'webrat', "~> 0.7.3"
gem 'autotest'
gem 'simplecov'
gem 'autotest-rails-pure'
gem 'simplecov', :require => false, :group => :test
gem 'spork'
end
group :production do
gem 'rack-google_analytics', :require => "rack/google_analytics"
end
Have you declared that gem in your Gemfile? Sometimes it helps to specify a specific version as you've done for some:
gem 'multi-json', '1.1.0'
If anyone turns out to be stuck on this what turned out to be the answer is one of our homegrown gems:
gem "xfire-api", :path => "vendor/gems/xfire-api"
had a require in it provided by a gem that was not specified in the gemspec. If you're stuck on this and have homegrown gems take a look through all your requires and makes sure all the files are provided by gems you specify in the Gemspec.
This is first time I'm trying to use Omniauth. While I was testing https://github.com/pt/devise-omniauth-example this example from github I came across an error
.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require': no such file to load -- openid/store/filesystem (LoadError)
Here is my Gemfile content
source 'http://rubygems.org'
gem 'rake'
gem 'rails'
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'devise', :git => 'git://github.com/plataformatec/devise', :branch => 'master'
gem "omniauth", "1.0.1"
gem 'paperclip'
gem "simple_form", "~> 1.5.2"
gem 'twitter_oauth', '0.4.3'
gem "rest-client", "1.6.7", :require => "restclient"
gem "sluggable"
group :development, :test do
gem 'rspec-rails'
gem 'fixjour'
end
I search web but there was no luck.
According to this:
If you get "openid/store/filesystem (LoadError)" then you may need to add this to your Gemfile:
gem "oa-openid"
This is due to various versions of Gems you are using and the dependencies among them.
In the example at https://github.com/pt/devise-omniauth-example,
if you notice the Gemfile ,there is
gem 'omniauth', '0.2.0'
but in your Gemfile above, you are using
gem "omniauth", "1.0.1"
Add gem 'ruby-openid-apps-discovery', and add below in application.rb.
require 'omniauth-openid'
require 'openid'
require 'openid/store/filesystem'
require 'gapps_openid'
I try to run spec tests and I get
bundle exec rake spec
Could not find selenium-webdriver-2.6.0 in any of the sources
So I bundle and I get:
bundle
Fetching source index for http://rubygems.org/
Could not find devise-1.4.6 in any of the sources
So I try to install devise 1.4.6 but I get
gem install devise -v1.4.6
ERROR: Could not find a valid gem 'devise' (= 1.4.6) in any repository
ERROR: Possible alternatives: devise
Which is really strange as my Gem file itself just has 'Devise' (no version number).
The rest of my Gem file is below.
I have also done rake test:prepare and the database and table exists in test.
cat Gemfile
source 'http://rubygems.org'
gem 'rake', '0.9.2'
gem 'rails', '3.1.0'
gem 'haml'
gem 'simple_form'
gem 'devise'
gem 'mysql2'
gem 'therubyracer'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', " ~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end
gem 'jquery-rails'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
group :test, :development do
# gem 'cucumber-rails', '0.5.0'
gem 'capybara'#, '1.0.0.beta1'
gem 'database_cleaner'#, '0.6.7'
gem "rspec-rails", "~> 2.6"
# gem 'forgery', '0.3.8'
gem "forgery"
gem 'factory_girl'#, '1.3.3'
gem 'factory_girl_rails'#, '1.0.1'
gem 'shoulda'#, '2.11.3'
gem 'rcov'
gem 'turn', :require => false # Pretty printed test output
end
Yes, it has been yanked, see here:
1.4.6 September 19, 2011 yanked
It is reading your Gemfile.lock so you need to run bundle update
For some reason, my project has messed up and now its throwing errors every time I try to run bundle install. Somem of the errors i've managed to fix by reordering the gems in my Gemfile, but now i'm getting this one:
Bundler could not find compatible versions for gem "faraday":
In Gemfile:
omniauth depends on
faraday (~> 0.7.3)
twitter depends on
faraday (0.6.1)
I thought that using bundler was supposed to erase dependency wtf's? I'm assumingn this message means that two gems want 2 different versions of faraday..?
How can I fix this problem though? Why doesn't it just install both versions, and each gem loads the version it wants?
I'd love some help on this please!
Thanks
Gemfile.lock:
https://gist.github.com/1061722
Gemfile:
# Edit this Gemfile to bundle your application's dependencies.
source 'http://rubygems.org'
gem 'rails', '3.0.9' #, :git => 'git://github.com/rails/rails.git'
gem "haml-rails"
gem "jquery-rails"
# Gem to abstract away the dplication common in standard restful controllers
gem 'inherited_resources'
# Allows us to keep an order of a user's items in their collection
gem "acts_as_list"
# Used to simplify user registrations and logins
# Pined to ref, as there is problem on devise HEAD
gem "devise", :git => "git://github.com/plataformatec/devise.git", :ref => '4964f53a42a3d434ee6d731d6f999d8dae13dada'
# Might not be used
gem "ajaxful_rating"
# Facilitates Edit-in-place functionality for certain data fields
gem "best_in_place", :git => 'git://github.com/moabite/best_in_place.git'
# Gem for uploading images. More flexible than "paperclip"
gem "carrierwave", :git => 'git://github.com/jnicklas/carrierwave.git'
gem "fog"
# Apparently needed to make the uploadify multifile uploader work
gem "flash_cookie_session"
# Used to that we can resize images uploaded through carrierwave, using
# ImageMagick
gem "rmagick"
# Easily create database models for site simulation
gem "factory_girl_rails"
# Useful for fake data generation
gem "faker"
gem "randexp"
gem "random_data"
gem 'forgery'
gem "lorempixum", :require => 'lorempixum'
gem "hashie"
# gem 'aws-s3', :require => 'aws/s3'
# gem 'bcrypt-ruby', :require => 'bcrypt'
# Provides a shorter syntax for building forms
gem 'formtastic'
# Sends notifications of errors on Production app
gem "hoptoad_notifier"
# Social Media Gems FB Connect, FB, and Twitter
gem "omniauth", :git => "git://github.com/intridea/omniauth.git" ,:ref => "b9fe79961ab56041dbf9"
gem "fb_graph"
gem "twitter"
gem 'rake', '0.8.7'
gem "jammit"
gem "rest-client"
gem 'rails-erd', :git => "git://github.com/voormedia/rails-erd.git"
gem "nokogiri"
group :development, :test do
gem "guard"
gem "guard-ego"
gem "guard-bundler"
gem "guard-jammit"
gem "guard-rails"
gem "guard-rspec"
gem "guard-shell"
gem "guard-compass"
gem "guard-livereload"
gem 'rb-fsevent', :require => false
gem "rb-inotify", :require => false
gem "libnotify", :require => false
# Needed to run html2haml to convert html to haml
gem "hpricot"
gem "taps"
gem "heroku"
#gem "heroku-rails", :git => "git://github.com/railsjedi/heroku-rails.git"
gem "heroku-rails", :git => "git://github.com/sid137/heroku-rails.git"
gem "sqlite3-ruby", :require => 'sqlite3'
gem "ruby-debug19", :require => 'ruby-debug'
# nice table displays in Rails console
gem "hirb"
gem "facebook_test_users", :git => "git://github.com/sid137/facebook_test_users.git"
# Allows us to push the local development database up to Heroku, and pull the
# heroku db down locally
gem "yaml_db"
gem "escape_utils"
# Sass and Blueprint based css framework for dev machine
# use "compass compile . " to compile css before deployment
gem "compass", ">=0.11.1"
# Print a header in app/model/*.rb files, listing the db columns present for
# each model
gem "selenium-webdriver"
gem "rack-test"
gem "capybara", :require => 'capybara/rspec'
gem "launchy"
gem 'database_cleaner', :git => 'git://github.com/bmabey/database_cleaner.git'
gem "rspec-core", "2.6.4"
gem "rspec-rails"# , '2.6.0' #, '2.5.0'
#gem 'shoulda-matchers', :git => 'git://github.com/thoughtbot/shoulda-matchers.git'
#gem 'shoulda-matchers', :git => 'git://github.com/sid137/shoulda-matchers.git'
gem "ZenTest"
gem "autotest-rails"
end
The specific version of Omniauth that you're using depends on Faraday ~> 0.7.3, while the latest released version of Twitter gem needs 0.6.
You can fix this by using the latest version of Twitter gem from the repository.
gem 'twitter', :git => 'https://github.com/jnunemaker/twitter.git'
I had the exact same issue and it got resolved by the following two lines in my Gemfile:
gem 'twitter', :git => 'https://github.com/jnunemaker/twitter.git'
gem 'omniauth', :git => "git://github.com/intridea/omniauth.git" ,:ref => "b9fe79961ab56041dbf9"
try deleting your Gemfile.lock (file) and then do
bundle install