bold_rewards ∴ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.5.0]
bold_rewards ∴ rake -T | wc -l
46
bold_rewards ∴ cd vendor/plugins/pretty_flash
pretty_flash ∴ rake -T | wc -l
6
pretty_flash ∴ cd ../../..
bold_rewards ∴ rails c
Loading development environment (Rails 3.0.3)
>> Dir.pwd
=> "/Users/george/work/bold_rewards"
>> `rake -T | wc -l`.chomp.strip
=> "46"
>> Dir.chdir 'vendor/plugins/pretty_flash'
=> 0
>> Dir.pwd
=> "/Users/george/work/bold_rewards/vendor/plugins/pretty_flash"
>> `rake -T | wc -l`.chomp.strip
=> "6"
>> Dir.chdir Rails.root
=> 0
>> `rake -T | wc -l`.chomp.strip
=> "46"
>>
不幸的是,我認爲捆紮機是一個非常就難了:
increment ∴ cat Gemfile
source 'http://rubygems.org'
gem 'rails', '3.0.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3-ruby', :require => 'sqlite3'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19'
# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
# gem 'webrat'
# end
increment ∴ cat vendor/subproject_x/Gemfile
source 'http://rubygems.org'
gem 'net-ssh'
increment ∴ rails c
Loading development environment (Rails 3.0.3)
>> Dir.pwd
=> "/Users/george/tmp/increment"
>> `BUNDLE_GEMFILE="vendor/subproject_x/Gemfile" bundle install`
=> "\e[31mCould not find net-ssh-2.0.24 in any of the sources\e[0m\n"
>> Dir.chdir 'vendor/subproject_x'
=> 0
>> Dir.entries '.'
=> [".", "..", "Gemfile", "Rakefile"]
>> Dir.pwd
=> "/Users/george/tmp/increment/vendor/subproject_x"
>> `BUNDLE_GEMFILE="Gemfile" bundle install`
=> "\e[31mCould not find net-ssh-2.0.24 in any of the sources\e[0m\n"
>> Dir.chdir Rails.root
=> 0
>> Dir.pwd
=> "/Users/george/tmp/increment"
>> `BUNDLE_GEMFILE="vendor/subproject_x/Gemfile" bundle install`
=> "\e[31mCould not find net-ssh-2.0.24 in any of the sources\e[0m\n"
>> quit
increment ∴ cd vendor/subproject_x
subproject_x ∴ bundle install
Fetching source index for http://rubygems.org/
Installing net-ssh (2.0.24)
Using bundler (1.0.7)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
subproject_x ∴
什麼是Rails子項目? – Heikki 2011-01-14 18:45:44
只有具有自己的rake和bundler文件的子目錄 – 2011-01-14 19:28:51