HighDots Forums  

Trouble Freezing Rails

Ruby On Rails Talk Ruby On Rails programming language mailing list


Discuss Trouble Freezing Rails in the Ruby On Rails Talk forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bob
 
Posts: n/a

Default Trouble Freezing Rails - 11-04-2009 , 01:20 PM






I have a Rails app that is currently running in production on Rails
v1.2.2. Since I didn't have control of the server that runs the
production copy of this app, I have put off upgrading to v2.x.
However, I recently read about freezing Rails to your app, making it
independent of the version of Rails installed on the server so I
upgraded my app to v2.3.4. On my development machine everything
worked great after freezing Rails to my upgraded app, (presumably
because I have Rails v2.3.4 installed locally). As a test of the
freezing process, I copied my frozen app to an old PC that only has
Rails v2.0.2 installed and tried starting up a Mongrel server . This
is unsuccessful, and causes the following error...

E:/Ruby/lib/ruby/site_ruby/1.8/rubygem.rb:246: in 'activate': can't
activate actionpack (= 2.0.2), already activated actionpack-2.3.4]
(Gem::Exception)

If I go to the gems directory on this box and rename the
actionpack-2.0.2 directory (such as adding a -) and try starting
mongrel again I get a similar error message...

E:/Ruby/lib/ruby/site_ruby/1.8/rubygem.rb:246: in 'activate': can't
activate rails (= 2.0.2), already activated rails-2.3.4]
(Gem::Exception)

I checked my controllers for includes that might be causing this, but
nothing seemed suspicious (only includes were for 'date', 'net/http',
and 'uri') Any help with this would be greatly appreciated. Freezing
seemed so straightforward, don't know why it's causing me so many
problems.

Thanks for any nuggets of insight / wisdom that come my way...

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
  #2  
Old   
Matt Jones
 
Posts: n/a

Default Re: Trouble Freezing Rails - 11-05-2009 , 11:54 AM






If you post the rest of the backtrace, it will be much more helpful.
The activation is coming from *somewhere*, so the trace will show
that.

--Matt Jones


On Nov 4, 1:20*pm, Bob <rpell... (AT) gmail (DOT) com> wrote:
Quote:
I have a Rails app that is currently running in production on Rails
v1.2.2. *Since I didn't have control of the server that runs the
production copy of this app, I have put off upgrading to v2.x.
However, I recently read about freezing Rails to your app, making it
independent of the version of Rails installed on the server so I
upgraded my app to v2.3.4. *On my development machine everything
worked great after freezing Rails to my upgraded app, (presumably
because I have Rails v2.3.4 installed locally). *As a test of the
freezing process, I copied my frozen app to an old PC that only has
Rails v2.0.2 installed and tried starting up a Mongrel server . *This
is unsuccessful, and causes the following error...

E:/Ruby/lib/ruby/site_ruby/1.8/rubygem.rb:246: in 'activate': can't
activate actionpack (= 2.0.2), already activated actionpack-2.3.4]
(Gem::Exception)

If I go to the gems directory on this box and rename the
actionpack-2.0.2 directory (such as adding a -) and try starting
mongrel again I get a similar error message...

E:/Ruby/lib/ruby/site_ruby/1.8/rubygem.rb:246: in 'activate': can't
activate rails (= 2.0.2), already activated rails-2.3.4]
(Gem::Exception)

I checked my controllers for includes that might be causing this, but
nothing seemed suspicious (only includes were for 'date', 'net/http',
and 'uri') *Any help with this would be greatly appreciated. *Freezing
seemed so straightforward, don't know why it's causing me so many
problems.

Thanks for any nuggets of insight / wisdom that come my way...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
  #3  
Old   
Bob
 
Posts: n/a

Default Re: Trouble Freezing Rails - 11-06-2009 , 10:43 AM



Thanks for the reply Matt,

Unfortunately, I cannot post more of the backtrace because I am unable
to reproduce the same error now that I have made progress on this
problem. I did the following on the machine with Rails 2.0.2 on it
and all works well there now.

-updated rubygems from 0.9.4 to 1.3.5 and updated all gems that
rubygems-update-1.3.5 depends on (builder, session, hoe-seattlerb,
minitest, hoe)
-installed rack gem 1.0.1

My next hurdle is to attempt freezing all of these gems and forcing
rubygems-update to be loaded on my production app. I was thinking of
doing this by adding a 'require' into dispatch.fcgi but I'm not sure
if this is wise or if it'll even work at all.

Of course I welcome any advice anyone has...

On Nov 5, 11:54*am, Matt Jones <al2o... (AT) gmail (DOT) com> wrote:
Quote:
If you post the rest of the backtrace, it will be much more helpful.
The activation is coming from *somewhere*, so the trace will show
that.

--Matt Jones

On Nov 4, 1:20*pm, Bob <rpell... (AT) gmail (DOT) com> wrote:

I have a Rails app that is currently running in production on Rails
v1.2.2. *Since I didn't have control of the server that runs the
production copy of this app, I have put off upgrading to v2.x.
However, I recently read about freezing Rails to your app, making it
independent of the version of Rails installed on the server so I
upgraded my app to v2.3.4. *On my development machine everything
worked great after freezing Rails to my upgraded app, (presumably
because I have Rails v2.3.4 installed locally). *As a test of the
freezing process, I copied my frozen app to an old PC that only has
Rails v2.0.2 installed and tried starting up a Mongrel server . *This
is unsuccessful, and causes the following error...

E:/Ruby/lib/ruby/site_ruby/1.8/rubygem.rb:246: in 'activate': can't
activate actionpack (= 2.0.2), already activated actionpack-2.3.4]
(Gem::Exception)

If I go to the gems directory on this box and rename the
actionpack-2.0.2 directory (such as adding a -) and try starting
mongrel again I get a similar error message...

E:/Ruby/lib/ruby/site_ruby/1.8/rubygem.rb:246: in 'activate': can't
activate rails (= 2.0.2), already activated rails-2.3.4]
(Gem::Exception)

I checked my controllers for includes that might be causing this, but
nothing seemed suspicious (only includes were for 'date', 'net/http',
and 'uri') *Any help with this would be greatly appreciated. *Freezing
seemed so straightforward, don't know why it's causing me so many
problems.

Thanks for any nuggets of insight / wisdom that come my way...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
  #4  
Old   
Matt Jones
 
Posts: n/a

Default Re: Trouble Freezing Rails - 11-06-2009 , 05:10 PM



If you don't control the server and the Rubygems version is old,
you're pretty much out of luck. The only way around it is to compile a
new Ruby and Rubygems from source and tell your app to use that.
You'll probably want to check with whoever *does* control the server
about the availability of the compiler toolchain before trying that
(on Site5, they needed to add you to a special "compiler" group, for
instance).

--Matt Jones


On Nov 6, 10:43*am, Bob <rpell... (AT) gmail (DOT) com> wrote:
Quote:
Thanks for the reply Matt,

Unfortunately, I cannot post more of the backtrace because I am unable
to reproduce the same error now that I have made progress on this
problem. *I did the following on the machine with Rails 2.0.2 on it
and all works well there now.

-updated rubygems from 0.9.4 to 1.3.5 and updated all gems that
rubygems-update-1.3.5 depends on (builder, session, hoe-seattlerb,
minitest, hoe)
-installed rack gem 1.0.1

My next hurdle is to attempt freezing all of these gems and forcing
rubygems-update to be loaded on my production app. *I was thinking of
doing this by adding a 'require' into dispatch.fcgi but I'm not sure
if this is wise or if it'll even work at all.

Of course I welcome any advice anyone has...

On Nov 5, 11:54*am, Matt Jones <al2o... (AT) gmail (DOT) com> wrote:



If you post the rest of the backtrace, it will be much more helpful.
The activation is coming from *somewhere*, so the trace will show
that.

--Matt Jones

On Nov 4, 1:20*pm, Bob <rpell... (AT) gmail (DOT) com> wrote:

I have a Rails app that is currently running in production on Rails
v1.2.2. *Since I didn't have control of the server that runs the
production copy of this app, I have put off upgrading to v2.x.
However, I recently read about freezing Rails to your app, making it
independent of the version of Rails installed on the server so I
upgraded my app to v2.3.4. *On my development machine everything
worked great after freezing Rails to my upgraded app, (presumably
because I have Rails v2.3.4 installed locally). *As a test of the
freezing process, I copied my frozen app to an old PC that only has
Rails v2.0.2 installed and tried starting up a Mongrel server . *This
is unsuccessful, and causes the following error...

E:/Ruby/lib/ruby/site_ruby/1.8/rubygem.rb:246: in 'activate': can't
activate actionpack (= 2.0.2), already activated actionpack-2.3.4]
(Gem::Exception)

If I go to the gems directory on this box and rename the
actionpack-2.0.2 directory (such as adding a -) and try starting
mongrel again I get a similar error message...

E:/Ruby/lib/ruby/site_ruby/1.8/rubygem.rb:246: in 'activate': can't
activate rails (= 2.0.2), already activated rails-2.3.4]
(Gem::Exception)

I checked my controllers for includes that might be causing this, but
nothing seemed suspicious (only includes were for 'date', 'net/http',
and 'uri') *Any help with this would be greatly appreciated. *Freezing
seemed so straightforward, don't know why it's causing me so many
problems.

Thanks for any nuggets of insight / wisdom that come my way...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.