2

mavricks、Postgres.app、RVM、Git を新規インストールしました。

標準の新しい Rails アプリを作成しましたが、すべて正常に動作しました。

ただし、github からプロジェクトを取得しようとしたときに、バンドル インストールを実行できません。

  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'

プロジェクトを削除して、再度複製しようとしました。

gemset を削除して、gemset からすべての gem を削除しようとしました。

また、エラー メッセージに従って、キャッシュ フォルダーを削除しようとしました。

このプロジェクトの作業に本当に戻る必要があるので、助けてください。

Update:

バンドルの更新も試しました。

➜  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'

アップデート

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'
4

1 に答える 1

5

https://github.com/thomas-mcdonald/bootstrap-sass/にはもうブランチはあり3ません。そのため、Git は不平を言っています。したがって、次のように変更する必要があります。

gem 'bootstrap-sass', :github => 'git://github.com/thomas-mcdonald/bootstrap-sass.git', :branch => '3'

に:

gem 'bootstrap-sass', :git => 'git://github.com/thomas-mcdonald/bootstrap-sass.git'

または簡略構文を使用します。

gem 'bootstrap-sass', :github => 'thomas-mcdonald/bootstrap-sass'
于 2013-12-09T16:42:19.653 に答える