# I want to run my Rails 1.2 site in Rails 2.1

**URL:** <https://www.ruby-forum.com/t/i-want-to-run-my-rails-1-2-site-in-rails-2-1/150167>\
**Category:** Rails\
**Created:** [October 5, 2008, 5:28am UTC](https://www.ruby-forum.com/t/i-want-to-run-my-rails-1-2-site-in-rails-2-1/150167 "2008-10-05T05:28:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![The\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/edb3f5/32.png) [@The\_N](https://www.ruby-forum.com/u/The_N)\
**Post date:** [October 5, 2008, 5:28am UTC](https://www.ruby-forum.com/t/i-want-to-run-my-rails-1-2-site-in-rails-2-1/150167/1 "2008-10-05T05:28:06Z")

</div>

Hi there, good people.

I have a coworker who have a Rails 1.2 website (1.2.2 to be exact) and  
recently I installed in her workstation Rails 2.1. Obviously, her  
project doesn’t work in that version because the WEBrick ask to  
install the previous version.

My question: Is there a way where these versions can coexist without  
making any conflict? Is there any solution? If not, how can I upgrade  
that project to 2.1 without any hiccups or major changes on the source  
code? Is there any tutorials where I can do this job? It’s very  
important because she needs to see it running again.

Thanks in advance.

Juan “The N.” Escajadillo.

---

<div class="post-metadata">

**Author:** ![The\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/edb3f5/32.png) [@The\_N](https://www.ruby-forum.com/u/The_N)\
**Post date:** [October 5, 2008, 5:53am UTC](https://www.ruby-forum.com/t/i-want-to-run-my-rails-1-2-site-in-rails-2-1/150167/2 "2008-10-05T05:53:50Z")

</div>

On Oct 5, 2:51 am, The N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi there, good people.
> 
> I have a coworker who have a Rails 1.2 website (1.2.2 to be exact) and  
> recently I installed in her workstation Rails 2.1. Obviously, her  
> project doesn’t work in that version because the WEBrick ask to  
> install the previous version.
> 
> My question: Is there a way where these versions can coexist without  
> making any conflict? Is there any solution? If not, how can I upgrade

In a nutshell you’ve got two choices: either you freeze rails into the  
app (using the appropriately named rake tasks), which gives the app  
its own copy of rails in your\_app/vendor/rails or you fiddle  
RAILS\_GEM\_VERSION in environment.rb

Fred

---

<div class="post-metadata">

**Author:** ![The\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/edb3f5/32.png) [@The\_N](https://www.ruby-forum.com/u/The_N)\
**Post date:** [October 5, 2008, 7:25am UTC](https://www.ruby-forum.com/t/i-want-to-run-my-rails-1-2-site-in-rails-2-1/150167/3 "2008-10-05T07:25:04Z")

</div>

> I have a coworker who have a Rails 1.2 website (1.2.2 to be exact) and  
> recently I installed in her workstation Rails 2.1. Obviously, her  
> project doesn’t work in that version because the WEBrick ask to  
> install the previous version.

On another computer, install a higher Rails version, such as 1.4, change  
the  
RAILS\_GEM\_VERSION in environment.rb, and run rake rails:update.

Then run all your tests (you do _have_ tests, right?), and commit your  
code if  
they pass.

Then repeat for, say Rails 1.6. Keep walking the version up.

At any time, if the tests fail, rock back to the previous baselined  
version, and  
then make whatever changes are needed so the tests would pass in the  
higher  
version. Then integrate (meaning pass all tests), and then try the next  
version  
again.

You can keep going like that until you hit 2.1.

Oh, and certain plugins will die, as their authors abandoned them. You  
can cover  
that by removing the plugins and commenting-out whatever features they  
provided.  
Then rebuild them.

---

<div class="post-metadata">

**Author:** ![The\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/edb3f5/32.png) [@The\_N](https://www.ruby-forum.com/u/The_N)\
**Post date:** [October 6, 2008, 4:38pm UTC](https://www.ruby-forum.com/t/i-want-to-run-my-rails-1-2-site-in-rails-2-1/150167/4 "2008-10-06T16:38:57Z")

</div>

Everything goes fine change the versión in environment.rb and updating  
with “rake rails:update”. But when I hit the “rake test”, this was  
what the console spawned:

(in /home/jescajadillo/user/argos)

* * *

```
  * config.breakpoint_server has been deprecated and has no

```

effect. \*

* * *

/usr/local/bin/ruby -Ilib:test “/usr/local/lib/ruby/gems/1.8/gems/  
rake-0.8.2/lib/rake/rake\_test\_loader.rb” “test/functional/  
festejos\_controller\_test.rb” “test/functional/  
modificarprof\_controller\_test.rb” “test/functional/  
avalados\_controller\_test.rb” “test/functional/  
contactanos\_controller\_test.rb” “test/functional/  
paso2\_reservacion\_controller\_test.rb” “test/functional/  
horarios\_controller\_test.rb” “test/functional/  
paso1\_reservacion\_controller\_test.rb” “test/functional/  
modificarsecre\_controller\_test.rb” “test/functional/  
entidad\_beneficiarias\_controller\_test.rb” “test/functional/  
afiliado\_titulares\_controller\_test.rb” “test/functional/  
cursos\_controller\_test.rb” “test/functional/  
eventos\_controller\_test.rb” “test/functional/  
usuario\_cursos\_controller\_test.rb” “test/functional/  
imagen\_areas\_controller\_test.rb” “test/functional/  
areas\_controller\_test.rb”  
/home/jescajadillo/user/argos/app/controllers/festejos\_controller.rb:  
2: undefined method `scaffold' for FestejosController:Class (NoMethodError) from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 27:in`gem\_original\_require’  
from /usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:  
27:in `require' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ active_support/dependencies.rb:510:in`require’  
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/  
active\_support/dependencies.rb:355:in `new_constants_in' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ active_support/dependencies.rb:510:in`require’  
from ./test/functional/festejos\_controller\_test.rb:2  
from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake/  
rake\_test\_loader.rb:5:in `load' from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake/ rake_test_loader.rb:5 from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake/ rake_test_loader.rb:5:in`each’  
from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake/  
rake\_test\_loader.rb:5  
/usr/local/bin/ruby -Ilib:test “/usr/local/lib/ruby/gems/1.8/gems/  
rake-0.8.2/lib/rake/rake\_test\_loader.rb”  
Errors running test:units and test:functionals!

Sorry, I’m kind of new to Rails. Any ideas of what’s next?

Regards,  
The N.

P.S.: The lines were the project I was talking about

---

<div class="post-metadata">

**Author:** ![The\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/edb3f5/32.png) [@The\_N](https://www.ruby-forum.com/u/The_N)\
**Post date:** [October 6, 2008, 5:42pm UTC](https://www.ruby-forum.com/t/i-want-to-run-my-rails-1-2-site-in-rails-2-1/150167/5 "2008-10-06T17:42:32Z")

</div>

Sorry! I put back the subject to its original name to avoid confusion  
and post you answers.

---

<div class="post-metadata">

**Author:** ![The\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/edb3f5/32.png) [@The\_N](https://www.ruby-forum.com/u/The_N)\
**Post date:** [October 7, 2008, 9:03pm UTC](https://www.ruby-forum.com/t/i-want-to-run-my-rails-1-2-site-in-rails-2-1/150167/6 "2008-10-07T21:03:04Z")

</div>

Here I went again on “rake test”. These were the results:

* * *

```
  * config.breakpoint_server has been deprecated and has no

```

effect. \*

* * *

/usr/local/bin/ruby -Ilib:test “/usr/local/lib/ruby/gems/1.8/gems/  
rake-0.8.2/lib/rake/rake\_test\_loader.rb” “test/functional/  
festejos\_controller\_test.rb” “test/functional/  
modificarprof\_controller\_test.rb” “test/functional/  
avalados\_controller\_test.rb” “test/functional/  
contactanos\_controller\_test.rb” “test/functional/  
paso2\_reservacion\_controller\_test.rb” “test/functional/  
horarios\_controller\_test.rb” “test/functional/  
paso1\_reservacion\_controller\_test.rb” “test/functional/  
modificarsecre\_controller\_test.rb” “test/functional/  
entidad\_beneficiarias\_controller\_test.rb” “test/functional/  
afiliado\_titulares\_controller\_test.rb” “test/functional/  
cursos\_controller\_test.rb” “test/functional/  
eventos\_controller\_test.rb” “test/functional/  
usuario\_cursos\_controller\_test.rb” “test/functional/  
imagen\_areas\_controller\_test.rb” “test/functional/  
areas\_controller\_test.rb”  
DEPRECATION WARNING: You’re using the Ruby-based MySQL library that  
ships with Rails. This library will be REMOVED FROM RAILS 2.2. Please  
switch to the offical mysql gem: `gem install mysql` See  
[http://www.rubyonrails.org/deprecation](http://www.rubyonrails.org/deprecation) for details. (called from  
mysql\_connection at /usr/local/lib/ruby/gems/1.8/gems/  
activerecord-2.1.1/lib/active\_record/connection\_adapters/  
mysql\_adapter.rb:81)  
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active\_record/  
vendor/mysql.rb:107:in `initialize': No such file or directory - /tmp/ mysql.sock (Errno::ENOENT) from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ active_record/vendor/mysql.rb:107:in `new’  
from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/  
active\_record/vendor/mysql.rb:107:in `real_connect' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ active_record/connection_adapters/mysql_adapter.rb:527:in `connect’  
from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/  
active\_record/connection\_adapters/mysql\_adapter.rb:186:in `initialize' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ active_record/connection_adapters/mysql_adapter.rb:85:in `new’  
from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/  
active\_record/connection\_adapters/mysql\_adapter.rb:85:in  
`mysql_connection' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ active_record/connection_adapters/abstract/connection_specification.rb: 292:in `send’  
from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/  
active\_record/connection\_adapters/abstract/connection\_specification.rb:  
292:in `connection=' ... 18 levels... from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake/ rake_test_loader.rb:5:in `load’  
from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake/  
rake\_test\_loader.rb:5  
from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake/  
rake\_test\_loader.rb:5:in `each’  
from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake/  
rake\_test\_loader.rb:5  
/usr/local/bin/ruby -Ilib:test “/usr/local/lib/ruby/gems/1.8/gems/  
rake-0.8.2/lib/rake/rake\_test\_loader.rb”  
Errors running test:units and test:functionals!

The results were a bit different because of the Scaffolding Extensions  
plugin I installed on her project. Now it’s asking me to install the  
MySQL gem. I found version 2.7 of it. According to various manuals,  
the installation is as follows:  
gem install mysql – --with-mysql-dir=/usr/local/mysql (where /usr/  
local is the location of MySQL)

Surely this will work, but one last question. How can I make dissapear  
the config.breakpoint\_server deprecation?

I’ll post anynews here if this worked or not.

Greetings.

---

<div class="post-metadata">

**Author:** ![The\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/edb3f5/32.png) [@The\_N](https://www.ruby-forum.com/u/The_N)\
**Post date:** [October 7, 2008, 9:07pm UTC](https://www.ruby-forum.com/t/i-want-to-run-my-rails-1-2-site-in-rails-2-1/150167/7 "2008-10-07T21:07:10Z")

</div>

On Oct 7, 7:51 pm, The N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Surely this will work, but one last question. How can I make dissapear  
> the config.breakpoint\_server deprecation?

Remove it from development.rb

Fred

---

<div class="post-metadata">

**Author:** ![The\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/edb3f5/32.png) [@The\_N](https://www.ruby-forum.com/u/The_N)\
**Post date:** [October 6, 2008, 5:53pm UTC](https://www.ruby-forum.com/t/i-want-to-run-my-rails-1-2-site-in-rails-2-1/150167/8 "2008-10-06T17:53:09Z")

</div>

On 6 Oct 2008, at 15:38, The N. wrote:

> effect. \*
> 
> * * *

That is a warning that this setting is no longer used

> entidad\_beneficiarias\_controller\_test.rb" “test/functional/  
> afiliado\_titulares\_controller\_test.rb” “test/functional/  
> cursos\_controller\_test.rb” “test/functional/  
> eventos\_controller\_test.rb” “test/functional/  
> usuario\_cursos\_controller\_test.rb” “test/functional/  
> imagen\_areas\_controller\_test.rb” “test/functional/  
> areas\_controller\_test.rb”  
> /home/jescajadillo/user/argos/app/controllers/festejos\_controller.rb:  
> 2: undefined method `scaffold’ for FestejosController:Class

Dynamic scaffolding was removed from rails 2. It was then extracted  
into a plugin ([http://github.com/rails/scaffolding/tree](http://github.com/rails/scaffolding/tree))

Fred
