# Any thoughts on building a project using an old version of rails?

**URL:** <https://www.ruby-forum.com/t/any-thoughts-on-building-a-project-using-an-old-version-of-rails/139473>\
**Category:** Rails\
**Created:** [June 4, 2008, 7:19am UTC](https://www.ruby-forum.com/t/any-thoughts-on-building-a-project-using-an-old-version-of-rails/139473 "2008-06-04T07:19:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alanterra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/85e7bf/32.png) [@alanterra](https://www.ruby-forum.com/u/alanterra)\
**Post date:** [June 4, 2008, 7:19am UTC](https://www.ruby-forum.com/t/any-thoughts-on-building-a-project-using-an-old-version-of-rails/139473/1 "2008-06-04T07:19:59Z")

</div>

I am trying to build some sample projects from the book “Ajax on  
Rails.” These projects are built against Rails 1.1.5, I am using Rails  
2.0.2.

The directions are to copy the sample code to your code folder, add  
all the default rails files, and then edit config/database.yml.

So I installed the rails 1.1.5 gem, and then added the default files  
with

# rails _1.1.5_ -s photo\_gallery

But then script/server won’t work. It ran into two occurrences of  
“require\_gem” that seem to now need to be “require” in boot.rb. I  
changed those lines, and now I get

# script/server

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/  
1.8/rubygems/custom\_require.rb:27:in `gem_original_require': no such file to load -- rails (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/ usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require’  
from ./script/…/config/boot.rb:38  
from script/server:2:in `require’  
from script/server:2

And, for what it is worth, I can’t seem to freeze rails into this  
project or even into a new project. When I try

# rails _1.1.5_ -f test\_frozen

it generates all the rails files, but then when it tries to freeze the  
code I get the error message

/Library/Ruby/Gems/1.8/gems/rails-1.1.5/bin/rails:19:in `chdir': No such file or directory - -f (Errno::ENOENT) from /Library/Ruby/Gems/1.8/gems/rails-1.1.5/bin/rails:19 from /usr/bin/rails:19:in `load’  
from /usr/bin/rails:19

Is it just impossible to run an old version of rails?

If the answer is yes–then perhaps there is more modern example code  
that will allow me to experiment with [script.aculo.us](http://script.aculo.us) and JavaScript?  
Pointers?

Thanks

---

<div class="post-metadata">

**Author:** ![alanterra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/85e7bf/32.png) [@alanterra](https://www.ruby-forum.com/u/alanterra)\
**Post date:** [June 4, 2008, 8:36am UTC](https://www.ruby-forum.com/t/any-thoughts-on-building-a-project-using-an-old-version-of-rails/139473/2 "2008-06-04T08:36:52Z")

</div>

On 4 Jun 2008, at 06:19, alanterra wrote:

> # rails _1.1.5_ -s photo\_gallery
> 
> But then script/server won’t work. It ran into two occurrences of  
> “require\_gem” that seem to now need to be “require” in boot.rb. I  
> changed those lines, and now I get

The replacement for require\_gem is gem

Fred

---

<div class="post-metadata">

**Author:** ![alanterra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/85e7bf/32.png) [@alanterra](https://www.ruby-forum.com/u/alanterra)\
**Post date:** [June 4, 2008, 6:31pm UTC](https://www.ruby-forum.com/t/any-thoughts-on-building-a-project-using-an-old-version-of-rails/139473/3 "2008-06-04T18:31:58Z")

</div>

Thanks Frederick, that was the help I needed.

For anyone who stumbles across this post, a recipe for building  
“Example B: Photo Gallery” from “Ajax on Rails” by Scott R. is

download and unzip the archives from the book  
copy the code from “Photo Archive” to a folder named  
“photo\_archive” (for convenience)  
install rails 1.2.5 you don’t have it (gem install rails -v=1.2.5)  
install the standard rails files in photo\_archive (rails _1.2.5_  
photo\_archive -s)  
change “require\_gem” to “gem” in two places in config/boot.rb  
change RAILS\_GEM\_VERSION to ‘1.2.5’ in config/environment.rb  
configure the database and make an sql database if you need to  
run two rake tasks: rake rails:update; rake db:schema:load

For whatever reason, it wouldn’t build against rails 1.1.5 which it  
says it wants

Again, thanks

A
