Rails Bundle Install failing on bootstrap-sass - ruby-on-rails

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'

Related

Error while running bundle install in CentOS

I am getting the following error while running bundle install. I am getting this error while installing i18n gem. I am getting this error in Cent OS machine only.I didn't get this error in Windows machine.
[root#centos5_9 IDEA]# bundle install
JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
Fetching source index for http://rubygems.org/
Using rake (0.8.7)
System.java:-2:in `arraycopy': java.lang.ArrayIndexOutOfBoundsException
from DefaultResolver.java:111:in `makeTime'
from DefaultResolver.java:277:in `create'
from DefaultResolver.java:317:in `handleScalar'
from DefaultResolver.java:435:in `orgHandler'
from DefaultResolver.java:455:in `node_import'
from org/yecht/ruby/DefaultResolver$s_method_1_0$RUBYINVOKER$node_import.gen:65535:in `call'
from CachingCallSite.java:146:in `call'
from RubyLoadHandler.java:40:in `handle'
from Parser.java:300:in `addNode'
from DefaultYAMLParser.java:676:in `yyparse'
from Parser.java:290:in `yechtparse'
from Parser.java:284:in `parse'
My gem file contains following code.
source 'http://rubygems.org'
gem 'rails', '3.2.13'
gem "xml-simple", "=1.0.12"
gem "fastercsv", "=1.5.3"
gem "hpricot", "=0.8.2"
gem "newrelic_rpm", "=3.1.1"
gem "mime-types", "=1.16"
gem "writeexcel", "=0.6.4"
gem "i18n"
#gem "warbler","=1.3.0"
gem "rmagick4j","=0.3.7"
gem "starling","=0.10.1"
gem "jruby-memcache-client","=1.7.0"
gem "tzinfo","=0.3.29"
gem "jruby-jars","=1.5.6"
gem "jruby-rack","=1.0.5"
gem "activerecord-jdbc-adapter","=1.2.9"
gem "activeresource","=3.2.13"
gem "activesupport","=3.2.13"
gem "bouncy-castle-java","=1.5.0147"
gem "bundler","=1.3.5"
gem "columnize","=0.3.2"
gem "eventmachine","=0.12.10"
gem "jdbc-mysql"
gem "jruby-openssl","=0.8.8"
gem "jruby-prof","=0.1.0"
gem "memcache-client","=1.8.5"
gem "rack","=1.4.5"
gem "rake","=0.8.7"
gem "rspec","=1.3.0"
# gem "ruby-debug-base","=0.10.3.2"
gem "rubyzip","=0.9.4"
gem "sources","=0.0.1"
gem "mogli","=0.0.25"
gem "facebooker2","=0.0.8"
gem "json","=1.5.1"
gem "multi_json","=1.0.3"
gem "net-ldap", "=0.2.2"
gem "multi_xml","=0.4.1"
gem "httparty","=0.8.1"
gem 'exception_notification', :require => 'exception_notifier'
gem 'safe_attributes'
gem 'will_paginate'
gem 'delayed_job_active_record'
gem "daemons"
gem 'jruby-rack-worker', :platform => :jruby, :require => nil
#gem "ffi", "~> 1.9.0"
#gem 'spoon'
gem "resque"
# 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'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyrhino'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
platforms :jruby do
# gem "ruby-debug", "= 0.10.3"
# This is needed by now to let tests work on JRuby
# TODO: When the JRuby guys merge jruby-openssl in
# jruby this will be removed
#gem "jruby-openssl"
group :db do
gem "activerecord-jdbcmysql-adapter", "=1.2.9"
end
end
I am using rails 3.2.13.Please help us on this.
Thanks,
Initially reinstall the bundler at root or set up the ruby and rails environment:-
$ gem install bundler / brew gem install bundler
$ rvm use <ruby/jruby version>#<rails_version> if you are using rvm
Now go in your application directory and then run
$ bundle install
$ bundle update ( to get the latest version gem )
and you can try https://rubygems.org # some time it will work

Running web application with rails server

I need to work with a rails application on Mac OS 10.8 but I am having troubles starting the rails server.
I installed Ruby and I am using version ruby-1.9.2-p320 and I installed rvm and rails.
Following the Ruby Getting Started Guide (http://guides.rubyonrails.org/getting_started.html) what I need now is simply navigate into my application folder and run the command:
rails server
but I get this error
git://github.com/archiloque/rest-client.git (at master) is not checked out. Please run `bundle install`
When running the command bundle install I get stuck with the following error
Could not find gem 'rest-client (>= 0) ruby' in git://github.com/archiloque/rest-client.git (at master).
Source does not contain any versions of 'rest-client (>= 0) ruby'
What am I missing?
Strange thing I just noticed is that when running
gem rails install
I am notified that rails has been correctly installed (Successfully installed rails-3.2.13), but when checking its version
rails --version
I receive again the error message
git://github.com/archiloque/rest-client.git (at master) is not checked out. Please run `bundle install`
The content of my Gemfile follows:
source 'https://rubygems.org'
gem 'rails', '3.2.5'
gem 'sqlite3'
gem 'devise', '2.1.2'
gem 'rest-client', :git => 'git://github.com/archiloque/rest-client.git'
gem 'jquery-rails'
gem 'rspec-rails', group: [:test,:development]
gem "paperclip", :git => "git://github.com/thoughtbot/paperclip.git"
gem "rb-readline"
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'twitter-bootstrap-rails'
gem 'uglifier', '>= 1.0.3'
end
group :test do
gem 'debugger'
gem 'factory_girl_rails'
gem 'capybara'
gem 'guard-rspec'
gem 'vcr'
gem 'fakeweb'
gem 'rb-fsevent', :require => false
gem 'guard-rspec'
gem 'growl'
gem 'database_cleaner'
end
group :development do
gem 'capistrano'
gem 'capistrano-ext'
gem 'rvm-capistrano'
end
The owner of rest-client moved the repository, see here (https://github.com/archiloque/rest-client).
Use this in your Gemfile gem 'rest-client', :git => 'git://github.com/rest-client/rest-client.git'

bundle remote error: Repository not found

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

Heroku, Zentest, Rails 3 - error while pushing

I am trying to push to heroku by git push heroku master.
And I have this error.
Fetching source index for http://rubygems.org/
Installing rake (0.9.2.2)
Installing ZenTest (4.6.2) /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/installer.rb:170:in `install': ZenTest requires RubyGems version ~> 1.8. Try 'gem update --system' to update RubyGems itself. (Gem::InstallError)
But I do not need ZenTest at all. I deleted this gem from my gemfile.
Now my gemfile looks like this
source 'http://rubygems.org'
gem 'rails', '3.1.1'
gem 'sqlite3'
gem 'jquery-rails'
gem "rmagick"
gem "carrierwave"
#gem 'compass_twitter_bootstrap'
#gem 'gravatar_image_tag', '1.0.0.pre2'
group :development do
#gem 'rspec-rails', '2.6.1'
#gem 'annotate', '2.4.0'
end
group :test do
#gem 'rspec-rails', '2.6.1'
#gem 'webrat', '0.7.1'
gem 'turn', :require => false
end
group :assets do
gem 'sass-rails', '~> 3.1.4'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
gem 'twitter-bootstrap-rails'
end
source :gemcutter
gem 'sinatra', '1.0'
Then i run rvmsudo bundle to delete it from gemfile.lock.
But i still have this error.
What can do with this?
OP didn't need that ZenTest test gem, but for those getting here because of heroku failing to use ZenTest 4.7.0 (which could be required by some dependency gem such asRubyInline), use
gem 'ZenTest', '~> 4.3.0' in your GemFile (hopefully this version is sufficient).
Later version maybe supported as well, didn't test.
HTH
Did you do a git commit after modifying the gemfile?

rails Could not find devise-1.4.6 in any of the sources (trying to run rspec tests)

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

Resources