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 and JavaScript? Pointers?
Thanks