简体   繁体   中英

How would I include gems using Rails 1.2.3

I am currently in an internship in which I am learning Ruby on Rails (mostly version 3.x).

I am responsible for a project which has been made way back using Rails 1.2.3 so this contains no such thing as a "Gemfile" so can someone show me the way I can include gems in my project?

I started Rails with the version 2.1 but probably it is the same thing. So with rails 2 you put your gem in config/environnement.rb like this (for example):

config.gem 'mislav-will_paginate', :version => '2.3.6', :lib => 'will_paginate', 
:source => 'http://gems.github.com'

Next you run rake gems:install

Otherwise, other method, you have to just run in your shell gem install yourgem

I hope it is the same behaviour with Rails 1.2.3 but you will probably have issue with the version of the gems which will be incompatible with Rails 1.2.3

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM