gpt4 book ai didi

ruby-on-rails - Rails Bundle 安装在 bootstrap-sass 上失败

转载 作者:行者123 更新时间:2023-12-02 04:42:42 25 4
gpt4 key购买 nike

我刚刚全新安装了 mavricks、Postgres.app、RVM、Git。

我创建了一个标准的新 Rails 应用程序,一切正常。

但是,当我尝试从 github 上获取项目时,无法运行 bundle install。

  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:

我也刚刚尝试了 bundle 更新。

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

最佳答案

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'

关于ruby-on-rails - Rails Bundle 安装在 bootstrap-sass 上失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20475389/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com