我想自定义haml-rails
宝石,本地宝石失败on Rails的
所以我把它叉我在Github上项目,
然后复制到我的本地机器,并试图将其列入。
但它失败了。
我通过bundle update
固定,但我不知道为什么它成功使用git
,因为我认为它们是两个完全相同的项目。
如果我使用rails 3.2
和railties 3.x
,我应该只更改Gemfile
下的haml-rails
?或者我应该检查以前版本的haml-rails
哪些只支持导轨3?
$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "railties":
In snapshot (Gemfile.lock):
railties (3.2.13)
In Gemfile:
haml-rails (>= 0) ruby depends on
railties (>= 4.0.1) ruby
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
~/sandbox/la
$ cat Gemfile | grep haml
#gem "haml-rails"
gem "haml-rails", :path => "/Users/hsu-wei-cheng/Dropbox/Ruby/haml-rails"
# gem "haml-rails", :git => '[email protected]:poc7667/haml-rails.git'
~/sandbox/la
$ cd /Users/hsu-wei-cheng/Dropbox/Ruby/haml-rails
~/Dropbox/Ruby/haml-rails
(feature/custom_view_for_dqa)$ tree -L 3
.
├── Appraisals
├── Gemfile
├── LICENSE
├── README.md
├── Rakefile
├── gemfiles
│ ├── rails_4_0.gemfile
│ └── rails_4_1.gemfile
├── haml-rails.gemspec
├── lib
│ ├── generators
│ │ └── haml
│ ├── haml-rails
│ │ └── version.rb
│ └── haml-rails.rb
└── test
├── fixtures
│ └── routes.rb
├── lib
│ └── generators
└── test_helper.rb
9 directories, 12 files
~/Dropbox/Ruby/haml-rails
(feature/custom_view_for_dqa)$ bundle update
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.1.1)
Using i18n (0.6.9)
Using minitest (4.7.5)
Using multi_json (1.8.4)
Using atomic (1.1.14)
Using thread_safe (0.1.3)
Using tzinfo (0.3.38)
Installing activesupport (4.0.2)
Using builder (3.1.4)
Using erubis (2.7.0)
Using rack (1.5.2)
Using rack-test (0.6.2)
Installing actionpack (4.0.2)
Using mime-types (1.25.1)
Using polyglot (0.3.3)
Using treetop (1.4.15)
Using mail (2.5.4)
Installing actionmailer (4.0.2)
Installing activemodel (4.0.2)
Using activerecord-deprecated_finders (1.0.3)
Using arel (4.0.1)
Installing activerecord (4.0.2)
Using bundler (1.3.5)
Installing appraisal (0.5.2)
Using tilt (1.4.1)
Using haml (4.0.5)
Using thor (0.18.1)
Installing railties (4.0.2)
Using haml-rails (0.5.3) from source at /Users/Hsu-Wei-Cheng/Dropbox/Ruby/haml-rails
Using hike (1.2.3)
Using sprockets (2.10.1)
Using sprockets-rails (2.0.1)
Installing rails (4.0.2)
Your bundle is updated!
~/Dropbox/Ruby/haml-rails
(feature/custom_view_for_dqa)$ bundle update
~/Dropbox/Ruby/haml-rails
(feature/custom_view_for_dqa)$ ls
Appraisals LICENSE gemfiles/ test/
Gemfile README.md haml-rails.gemspec
Gemfile.lock Rakefile lib/
~/Dropbox/Ruby/haml-rails
(feature/custom_view_for_dqa)$
请删除图像,并将其替换为您看到的实际文字。图片实际上损害了你的问题的实用性,因为它们无法被搜索,这意味着当寻找类似问题的答案时,更少的人可以找到它们。 –