1

我有一個工作,部署的Rails 3.2.2應用程序中,我使用formtastic引導,薩斯寶石(其中包括)部署Rails應用程序。 要在我的表單中使用Twitter引導程序樣式,我使用formtastic-bootstrap寶石分割爲cgunther,因爲mjbellantoni的版本與Rails 3.2不兼容。403錯誤時與分叉formtastic的自舉寶石

我的Gemfile:

gem 'formtastic-bootstrap', :git => 'https://github.com/cgunther/formtastic-bootstrap.git', :branch => 'bootstrap2-rails3-2-formtastic-2-1' 

在我的本地機器可正常工作,但是當我部署我與Capistrano的應用程序,我得到一個錯誤:

Fetching https://github.com/cgunther/formtastic-bootstrap.git 
error: The requested URL returned error: 403 
fatal: Could not parse object '4e6a7f50153af805470d43a2bd2c9885a902e4a6'. 
Git error: command `git reset --hard 4e6a7f50153af805470d43a2bd2c9885a902e4a6` in directory /var/www/[appname]/shared/bundle/ruby/1.9.1/bundler/gems/formtastic-bootstrap-4e6a7f50153a has failed. 
If this error persists you could try removing the cache directory '/var/www/[appname]/shared/bundle/ruby/1.9.1/cache/bundler/git/formtastic-bootstrap-eabf0533be1e6746fb6d99b57db3fdd7c424275b' 

出現同樣的錯誤,當我在安裝formtastic-bootstrap gem時在服務器上運行bundle install命令。

有沒有人有線索?

回答

1

嘗試在您的Gemfile中將'https'更改爲'git'。它幫助我獲得了另一個寶石。