Migrating rails 1.0 app to 1.1 - Noob question


#1

Hi all, I’ve upgraded my system to Rails 1.1.1 successfully.

After much looking I haven’t found out how to migrate an existing
application to a new rails version though. What is the procedure, if
any, for upgrading the application I’ve developed in 1.0? Is there a
script I need to run?


#2

On Tue, 2006-04-11 at 14:59 +0200, Joe C. wrote:

Hi all, I’ve upgraded my system to Rails 1.1.1 successfully.

After much looking I haven’t found out how to migrate an existing
application to a new rails version though. What is the procedure, if
any, for upgrading the application I’ve developed in 1.0? Is there a
script I need to run?


I thought ‘rake rails:update’ was sufficient

Craig


#3

Craig W. wrote:

On Tue, 2006-04-11 at 14:59 +0200, Joe C. wrote:

Hi all, I’ve upgraded my system to Rails 1.1.1 successfully.

After much looking I haven’t found out how to migrate an existing
application to a new rails version though. What is the procedure, if
any, for upgrading the application I’ve developed in 1.0? Is there a
script I need to run?


I thought ‘rake rails:update’ was sufficient

Craig

Hi, I tried that, and received the following error:

"rake aborted!
Don’t know how to build task ‘rails:update’

(See full trace by running task with --trace)"

Do I need to be in a certain directory, or have something in the path?


#4

Craig W. wrote:

On Tue, 2006-04-11 at 14:59 +0200, Joe C. wrote:

Hi all, I’ve upgraded my system to Rails 1.1.1 successfully.

After much looking I haven’t found out how to migrate an existing
application to a new rails version though. What is the procedure, if
any, for upgrading the application I’ve developed in 1.0? Is there a
script I need to run?


I thought ‘rake rails:update’ was sufficient

Craig

And thanks btw!


#5

Craig W. wrote:

On Tue, 2006-04-11 at 15:33 +0200, Joe C. wrote:

Do I need to be in a certain directory, or have something in the path?


yeah - to convert a rails app from 1.0 to 1.1 using the above command,
you must necessarily be in the root for that app…

$ cd /home/craig/my_rails_app
$ ls -l
total 116
drwxr-xr-x 8 craig dom_users 4096 Mar 10 23:32 app
drwxr-xr-x 3 craig dom_users 4096 Mar 10 23:32 components
drwxr-xr-x 4 craig dom_users 4096 Apr 3 18:55 config
drwxr-xr-x 5 craig dom_users 4096 Apr 3 18:55 db
drwxr-xr-x 7 craig dom_users 4096 Mar 21 09:06 doc
drwxr-xr-x 4 craig dom_users 4096 Mar 30 00:05 lib
drwxr-xr-x 3 craig dom_users 4096 Mar 25 09:20 log
drwxr-xr-x 6 craig dom_users 4096 Mar 21 09:06 public
-rw-r–r-- 1 craig dom_users 307 Mar 10 23:33 Rakefile
-rw-r–r-- 1 craig dom_users 6064 Mar 10 23:33 README
drwxr-xr-x 5 craig dom_users 4096 Mar 21 09:05 script
drwxr-xr-x 7 craig dom_users 4096 Mar 21 09:05 test
drwxr-xr-x 6 craig dom_users 4096 Mar 28 10:36 tmp
drwxr-xr-x 4 craig dom_users 4096 Mar 10 23:33 vendor

$ rake rails:update

Craig

Thanks again Craig:
That’s exactly where I ran it from, very odd. I notice you’re running
unix, but I’m in XP; would that account for any difference in procedure?


#6

On Tue, 2006-04-11 at 15:50 +0200, Joe C. wrote:

total 116
drwxr-xr-x 5 craig dom_users 4096 Mar 21 09:05 script
unix, but I’m in XP; would that account for any difference in procedure?


according to this page…

http://weblog.rubyonrails.org/articles/2006/03/28/rails-1-1-rjs-active-record-respond_to-integration-tests-and-500-other-things

you need to upgrade ruby to version 1.8.4 on Windows

Craig


#7

On Tue, 2006-04-11 at 15:33 +0200, Joe C. wrote:

Do I need to be in a certain directory, or have something in the path?


yeah - to convert a rails app from 1.0 to 1.1 using the above command,
you must necessarily be in the root for that app…

$ cd /home/craig/my_rails_app
$ ls -l
total 116
drwxr-xr-x 8 craig dom_users 4096 Mar 10 23:32 app
drwxr-xr-x 3 craig dom_users 4096 Mar 10 23:32 components
drwxr-xr-x 4 craig dom_users 4096 Apr 3 18:55 config
drwxr-xr-x 5 craig dom_users 4096 Apr 3 18:55 db
drwxr-xr-x 7 craig dom_users 4096 Mar 21 09:06 doc
drwxr-xr-x 4 craig dom_users 4096 Mar 30 00:05 lib
drwxr-xr-x 3 craig dom_users 4096 Mar 25 09:20 log
drwxr-xr-x 6 craig dom_users 4096 Mar 21 09:06 public
-rw-r–r-- 1 craig dom_users 307 Mar 10 23:33 Rakefile
-rw-r–r-- 1 craig dom_users 6064 Mar 10 23:33 README
drwxr-xr-x 5 craig dom_users 4096 Mar 21 09:05 script
drwxr-xr-x 7 craig dom_users 4096 Mar 21 09:05 test
drwxr-xr-x 6 craig dom_users 4096 Mar 28 10:36 tmp
drwxr-xr-x 4 craig dom_users 4096 Mar 10 23:33 vendor

$ rake rails:update

Craig


#8

Are you using the 0.7 version of rake?

rake --version

rake, version 0.7.0


#9

Aidan F. wrote:

Are you using the 0.7 version of rake?

rake --version

rake, version 0.7.0

Yes, thanks…

C:@cs\phase2>rake --version
rake, version 0.7.1

…unless 0.7.1 is a problem.

Also, it seems 1.8.4 is giving my version of RMagick fits and starts,
there seem to be lots of function calls that are bugging the compiler.


#10

Craig W. wrote:

On Tue, 2006-04-11 at 15:50 +0200, Joe C. wrote:

total 116
drwxr-xr-x 5 craig dom_users 4096 Mar 21 09:05 script
unix, but I’m in XP; would that account for any difference in procedure?


according to this page…

http://weblog.rubyonrails.org/articles/2006/03/28/rails-1-1-rjs-active-record-respond_to-integration-tests-and-500-other-things

you need to upgrade ruby to version 1.8.4 on Windows

Craig

Hey Craig:

That was exactly my next move, upgraded to 1.8.4 from 1.8.2. Did a
fresh install, and also downloaded all my required gems again too.

Same error. Thanks though!


#11

Joe C. wrote:

Aidan F. wrote:

Are you using the 0.7 version of rake?

rake --version

rake, version 0.7.0

Yes, thanks…

C:@cs\phase2>rake --version
rake, version 0.7.1

…unless 0.7.1 is a problem.

Also, it seems 1.8.4 is giving my version of RMagick fits and starts,
there seem to be lots of function calls that are bugging the compiler.

Yes, that’s a known problem–I encountered problems running file_column
and RMagck with Ruby 1.8.4. It caused a bug where I couldn’t use tab
characters in my RHTML views. I downgraded back to 1.8.2.

Jeff C.man


#12

Jeff C.man wrote:
Yes, that’s a known problem–I encountered problems running file_column
and RMagck with Ruby 1.8.4. It caused a bug where I couldn’t use tab
characters in my RHTML views. I downgraded back to 1.8.2.

Jeff C.man

FYI, rolled back to 1.8.2 and everything works fine- thanks for pointing
that out. But the problem still stands, how do I now upgrade the app to
rails 1.1.x?


#13

Jeff C.man wrote:

Joe C. wrote:

Aidan F. wrote:

Are you using the 0.7 version of rake?

rake --version

rake, version 0.7.0

Yes, thanks…

C:@cs\phase2>rake --version
rake, version 0.7.1

…unless 0.7.1 is a problem.

Also, it seems 1.8.4 is giving my version of RMagick fits and starts,
there seem to be lots of function calls that are bugging the compiler.

Yes, that’s a known problem–I encountered problems running file_column
and RMagck with Ruby 1.8.4. It caused a bug where I couldn’t use tab
characters in my RHTML views. I downgraded back to 1.8.2.

Jeff C.man

Hi and thanks Jeff, it’s a relief(?) to know that. I’m not only
spinning in circles with learning RoR but with learning the upgrade
process as well.

Did you upgrade to rails 1.1.x? How did you manage to run the rake
routine? Is there some manual way to upgrade?


#14

Joe C. wrote:

Jeff C.man wrote:
Yes, that’s a known problem–I encountered problems running file_column
and RMagck with Ruby 1.8.4. It caused a bug where I couldn’t use tab
characters in my RHTML views. I downgraded back to 1.8.2.

Jeff C.man

FYI, rolled back to 1.8.2 and everything works fine- thanks for pointing
that out. But the problem still stands, how do I now upgrade the app to
rails 1.1.x?

I upgraded to Rails 1.1 without problem, but I encountered the same Rake
error you did when attempting to do the 1.1.x upgrade.

Not sure what the solution is, but since I hadn’t been experiencing any
pressing errors that made upgrading a necessitiy I haven’t pursued it
much further.

I’m following this thread to see what the solution might be though!

Jeff


#15

Jeff C.man wrote:

Just now I tried it again to see if I had missed anything earlier.

Not sure what I was doing before, but I got it to work.

I first did:

gem install rails --include-dependencies

to confirm that Rails 1.1.2 was installed currently.

Then I tried “rake freeze_gems” and got an error partway through, so I
manually deleted my vendor/rails directory. Then I did:

rake freeze_gems

which confirmed that it updated all the appropriate libraries into my
vendor/rails directory.

Then I did:

rake rails:update:configs

Which performed silently, didn’t give me any direct feedback, but didn’t
give an error.

Seemed to do the trick. My advice is to try deleting your vendor/rails
directory before freezing, and once that’s done the rake
rails:update:configs might work.

Jeff

No such luck… rake freeze_gems gave me the exact same error message:
C:@cs\phase2>rake freeze_gems
(in C:/@cs/phase2)
rake aborted!
Don’t know how to build task ‘freeze_gems’

(See full trace by running task with --trace)


#16

Jeff C.man wrote:

Joe C. wrote:

Jeff C.man wrote:
Yes, that’s a known problem–I encountered problems running file_column
and RMagck with Ruby 1.8.4. It caused a bug where I couldn’t use tab
characters in my RHTML views. I downgraded back to 1.8.2.

Jeff C.man

FYI, rolled back to 1.8.2 and everything works fine- thanks for pointing
that out. But the problem still stands, how do I now upgrade the app to
rails 1.1.x?

Just now I tried it again to see if I had missed anything earlier.

Not sure what I was doing before, but I got it to work.

I first did:

gem install rails --include-dependencies

to confirm that Rails 1.1.2 was installed currently.

Then I tried “rake freeze_gems” and got an error partway through, so I
manually deleted my vendor/rails directory. Then I did:

rake freeze_gems

which confirmed that it updated all the appropriate libraries into my
vendor/rails directory.

Then I did:

rake rails:update:configs

Which performed silently, didn’t give me any direct feedback, but didn’t
give an error.

Seemed to do the trick. My advice is to try deleting your vendor/rails
directory before freezing, and once that’s done the rake
rails:update:configs might work.

Jeff