Old rails project, new machine

166 views
Skip to first unread message

RVic

unread,
Oct 23, 2013, 8:44:46 AM10/23/13
to rubyonra...@googlegroups.com
I have an older rails app that runs on an old, windows machine that i ned to port to a more modern linux. The app is written using ruby 1.8.6 (2010-09-02 patchlevel 420) [i686-linux] with rails 2.3.2.

I have installed all of it on the new system, all the required gems and plugins, but when I go to fire it up from the projects to-level foder, it errors out on me. I've looked all over the web for this, but can't find the solution, and at this point, the tings others have tried frighten me as I dont really want to kill the pristine setup I have on this new machine (using rvm):
 
>ruby script/server
/home/user/.rvm/gems/ruby-1.8.6-p420/gems/executable-hooks-1.2.6/lib/executable-hooks/regenerate_binstubs_command.rb:47: warning: parenthlesize argument(s) for future version
=> Booting Mongrel
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
/home/user/.rvm/gems/ruby-1.8.6-p420/gems/rails-2.3.2/lib/rails/gem_dependency.rb:99:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement
/home/user/.rvm/rubies/ruby-1.8.6-p420/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- ruby-debug (MissingSourceFile)
    from /home/user/.rvm/rubies/ruby-1.8.6-p420/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /home/user/.rvm/gems/ruby-1.8.6-p420/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
    from /home/user/.rvm/gems/ruby-1.8.6-p420/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /home/user/.rvm/gems/ruby-1.8.6-p420/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
    from /home/user/ggripv2/config/environments/development.rb:2:in `load_environment'
    from /home/user/.rvm/gems/ruby-1.8.6-p420/gems/rails-2.3.2/lib/initializer.rb:365:in `load_environment'
    from /home/user/.rvm/gems/ruby-1.8.6-p420/gems/activesupport-2.3.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
    from /home/user/.rvm/gems/ruby-1.8.6-p420/gems/rails-2.3.2/lib/initializer.rb:358:in `load_environment'
     ... 9 levels...
    from /home/user/.rvm/gems/ruby-1.8.6-p420/gems/rails-2.3.2/lib/commands/server.rb:84
    from /home/user/.rvm/rubies/ruby-1.8.6-p420/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /home/user/.rvm/rubies/ruby-1.8.6-p420/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from script/server:3

Colin Law

unread,
Oct 23, 2013, 8:59:55 AM10/23/13
to rubyonra...@googlegroups.com
On 23 October 2013 13:44, RVic <rvin...@hotmail.com> wrote:
> I have an older rails app that runs on an old, windows machine that i ned to
> port to a more modern linux. The app is written using ruby 1.8.6 (2010-09-02
> patchlevel 420) [i686-linux] with rails 2.3.2.
>
> I have installed all of it on the new system, all the required gems and
> plugins, but when I go to fire it up from the projects to-level foder, it
> errors out on me. I've looked all over the web for this, but can't find the
> solution, and at this point, the tings others have tried frighten me as I
> dont really want to kill the pristine setup I have on this new machine
> (using rvm):
>
>>ruby script/server
> /home/user/.rvm/gems/ruby-1.8.6-p420/gems/executable-hooks-1.2.6/lib/executable-hooks/regenerate_binstubs_command.rb:47:
> warning: parenthlesize argument(s) for future version
> => Booting Mongrel
> => Rails 2.3.2 application starting on http://0.0.0.0:3000
> /home/user/.rvm/gems/ruby-1.8.6-p420/gems/rails-2.3.2/lib/rails/gem_dependency.rb:99:Warning:
> Gem::Dependency#version_requirements is deprecated and will be removed on or
> after August 2010. Use #requirement

I think, but am not certain, that the warnings may be due to using a
later version of rubygems.

> /home/user/.rvm/rubies/ruby-1.8.6-p420/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `gem_original_require': no such file to load -- ruby-debug

I guess you are missing the ruby-debug gem. Either install it or
remove the require in development.rb

Colin

RVic

unread,
Oct 23, 2013, 9:14:22 AM10/23/13
to rubyonra...@googlegroups.com
Colin,

I think you've forgotten more about Rails than I will ever know. Im using rvm, so to use in earlier versin of rubygems, how would I specify that? I took your advice and tried to comment out line 31 in custom_require.rb, and when I go to invoke with the old "ruby script/server" it now comes back with:

Error loading RubyGems plugin "/home/user/.rvm/gems/ruby-1.8.6-p420@global/gems/executable-hooks-1.2.5/lib/rubygems_plugin.rb": uninitialized constant ExecutableHooks (NameError)
./script/../config/boot.rb:39:in `run': uninitialized constant Rails::Initializer (NameError)
    from ./script/../config/boot.rb:11:in `boot!'

This is the same error I get when I go to install ruby-debug:

 gem install ruby-debug
Error loading RubyGems plugin "/home/user/.rvm/gems/ruby-1.8.6-p420/gems/executable-hooks-1.2.6/lib/rubygems_plugin.rb": uninitialized constant ExecutableHooks (NameError)
Error loading RubyGems plugin "/home/user/.rvm/gems/ruby-1.8.6-p420@global/gems/executable-hooks-1.2.5/lib/rubygems_plugin.rb": uninitialized constant ExecutableHooks (NameError)
/home/user/.rvm/rubies/ruby-1.8.6-p420/bin/gem:21: uninitialized constant Gem::GemRunner (NameError)

Colin Law

unread,
Oct 23, 2013, 9:46:55 AM10/23/13
to rubyonra...@googlegroups.com
On 23 October 2013 14:14, RVic <rvin...@hotmail.com> wrote:
> Colin,
>
> I think you've forgotten more about Rails than I will ever know. Im using
> rvm, so to use in earlier versin of rubygems, how would I specify that? I
> took your advice and tried to comment out line 31 in custom_require.rb, and
> when I go to invoke with the old "ruby script/server" it now comes back
> with:
>
> Error loading RubyGems plugin
> "/home/user/.rvm/gems/ruby-1.8.6-p420@global/gems/executable-hooks-1.2.5/lib/rubygems_plugin.rb":
> uninitialized constant ExecutableHooks (NameError)
> ./script/../config/boot.rb:39:in `run': uninitialized constant
> Rails::Initializer (NameError)
> from ./script/../config/boot.rb:11:in `boot!'

You can check which version of rubygems you have with
gem -v
If you do that on your old machine you can then install that version using
rvm install rubygems <version>
Then check with gem -v

I use 1.3.7 with rails 2, it gives a few warnings but works ok.

Colin

RVic

unread,
Oct 23, 2013, 10:53:54 AM10/23/13
to rubyonra...@googlegroups.com
Colin, ok, I installed 1.3.7:

 rvm install rubygems 1.3.7

then:

ruby script/server

Error loading RubyGems plugin "/home/user/.rvm/gems/ruby-1.8.6-p420/gems/executable-hooks-1.2.6/lib/rubygems_plugin.rb": uninitialized constant ExecutableHooks (NameError)
Error loading RubyGems plugin "/home/user/.rvm/gems/ruby-1.8.6-p420@global/gems/executable-hooks-1.2.5/lib/rubygems_plugin.rb": uninitialized constant ExecutableHooks (NameError)
./script/../config/boot.rb:39:in `run': uninitialized constant Rails::Initializer (NameError)
    from ./script/../config/boot.rb:11:in `boot!'

WHICH, if I now do:
gem -v

Error loading RubyGems plugin "/home/user/.rvm/gems/ruby-1.8.6-p420/gems/executable-hooks-1.2.6/lib/rubygems_plugin.rb": uninitialized constant ExecutableHooks (NameError)

It seems there's something missing at a higher level in my setup? Thanks for looking at this for me, I'm really stuck here. RVic


On Wednesday, October 23, 2013 8:44:46 AM UTC-4, RVic wrote:

Colin Law

unread,
Oct 23, 2013, 11:26:51 AM10/23/13
to rubyonra...@googlegroups.com
On 23 October 2013 15:53, RVic <rvin...@hotmail.com> wrote:

Could you please not top post, it makes it difficult to follow the
thread. Insert your reply at appropriate points in previous message.
Thanks.

> Colin, ok, I installed 1.3.7:
>
> rvm install rubygems 1.3.7
>
> then:
>
> ruby script/server
>
> Error loading RubyGems plugin
> "/home/user/.rvm/gems/ruby-1.8.6-p420/gems/executable-hooks-1.2.6/lib/rubygems_plugin.rb":
> uninitialized constant ExecutableHooks (NameError)
> Error loading RubyGems plugin
> "/home/user/.rvm/gems/ruby-1.8.6-p420@global/gems/executable-hooks-1.2.5/lib/rubygems_plugin.rb":
> uninitialized constant ExecutableHooks (NameError)
> ./script/../config/boot.rb:39:in `run': uninitialized constant
> Rails::Initializer (NameError)
> from ./script/../config/boot.rb:11:in `boot!'
>
> WHICH, if I now do:
> gem -v
>
> Error loading RubyGems plugin
> "/home/user/.rvm/gems/ruby-1.8.6-p420/gems/executable-hooks-1.2.6/lib/rubygems_plugin.rb":
> uninitialized constant ExecutableHooks (NameError)

Why are you using the executablehooks gem anyway on a rails 2 app?

Colin
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/07b5f995-ec2c-4b79-97de-5c2698056813%40googlegroups.com.
>
> For more options, visit https://groups.google.com/groups/opt_out.

RVic

unread,
Oct 23, 2013, 12:44:06 PM10/23/13
to rubyonra...@googlegroups.com, cla...@googlemail.com


On Wednesday, October 23, 2013 11:26:51 AM UTC-4, Colin Law wrote:
On 23 October 2013 15:53, RVic <rvin...@hotmail.com> wrote:

Could you please not top post, it makes it difficult to follow the
thread.  Insert your reply at appropriate points in previous message.
Thanks.

> Colin, ok, I installed 1.3.7:
>
>  rvm install rubygems 1.3.7
>
> then:
>
> ruby script/server
>
> Error loading RubyGems plugin
> "/home/user/.rvm/gems/ruby-1.8.6-p420/gems/executable-hooks-1.2.6/lib/rubygems_plugin.rb":
> uninitialized constant ExecutableHooks (NameError)
> Error loading RubyGems plugin
> "/home/user/.rvm/gems/ruby-1.8.6-p420@global/gems/executable-hooks-1.2.5/lib/rubygems_plugin.rb":
> uninitialized constant ExecutableHooks (NameError)
> ./script/../config/boot.rb:39:in `run': uninitialized constant
> Rails::Initializer (NameError)
>     from ./script/../config/boot.rb:11:in `boot!'
>
> WHICH, if I now do:
> gem -v
>
> Error loading RubyGems plugin
> "/home/user/.rvm/gems/ruby-1.8.6-p420/gems/executable-hooks-1.2.6/lib/rubygems_plugin.rb":
> uninitialized constant ExecutableHooks (NameError)

Why are you using  the executablehooks gem anyway on a rails 2 app?


I didn't intentionally  opt for that (or, if i did, it was X years ago when this thing was written!). How would I get rid of that? Thanks.

Colin Law

unread,
Oct 23, 2013, 3:43:22 PM10/23/13
to rubyonra...@googlegroups.com
Just uninstall the gem if you don't need it. Of course that may not
be the issue at all, you may get a similar problem somewhere else.

Was it used on the old system?

Colin

Ralph Vince

unread,
Oct 23, 2013, 3:59:49 PM10/23/13
to rubyonra...@googlegroups.com
Colin,

It must have been installed on the old system via a dependency to one of the other gems listed below (it;s the entire listing of commandsI used to install this onto a pristine Linux Mint 15 installation).

I have some serious doubts about this -- Ive been trying to get mongrel to fire up this rails app for a few days now, and am entirely unable to get anywhere with it. I cannot even list the gems on this installation now!

gem list --local

Error loading RubyGems plugin "/home/user/.rvm/gems/ruby-1.8.6-p420/gems/executable-hooks-1.2.6/lib/rubygems_plugin.rb": uninitialized constant ExecutableHooks (NameError)

I need to go back and start wit a pristine OS I think and start installing things one step at a time until I get this to run -- I dont think I can salvage this at this point. Here are the steps I took, and I will take again, one step at a time, until I get it to run or end up in thissame pit of despair!

sudo apt-get update
sudo apt-get install curl
curl -L get.rvm.io | bash -s stable --auto
. ~/.bash_profile
rvm requirements
rvm install 1.8.6
ruby -v
gem install rails -v 2.3.2
sudo apt-get install libpq-dev
sudo apt-get install libmysqlclient-dev
sudo apt-get install nodejs
gem install --remote mysql2
gem install --remote jdbc-mysql
gem install --remote authlogic --version 2.0.13
gem install --remote calendar_date_select --version 1.15
gem install --remote mongrel
gem install --remote paginator
gem install --remote pdf-writer
gem install --remote log4r
gem install --remote needle
gem install --remote nifty-generators
gem install --remote RedCloth
gem install --remote ruport
gem install --remote rubyzip --version 0.9.1
gem install --remote ruport-util
gem install --remote mailfactory
gem install --remote acts_as_reportable
gem list --local


Does that look ok to you? Thanks again. RVic

Colin Law

unread,
Oct 23, 2013, 4:12:30 PM10/23/13
to rubyonra...@googlegroups.com
Since the error you are getting in the executable-hooks gem I would
start by removing it and see what happens. It may not be compatible
with that version of ruby for example. Since it seems the first
version was only three months ago it seems unlikely that your app
needs it [1].

gem uninstall executable-hooks

Colin

[1] https://rubygems.org/gems/executable-hooks/versions

Ralph Vince

unread,
Oct 23, 2013, 4:19:15 PM10/23/13
to rubyonra...@googlegroups.com

Since the error you are getting in the executable-hooks gem I would
start by removing it and see what happens.  It may not be compatible
with that version of ruby for example.  Since it seems the first
version was only three months ago it seems unlikely that your app
needs it [1].

gem uninstall executable-hooks

Colin

[1] https://rubygems.org/gems/executable-hooks/versions

Colin, yes, but this is the world I am stuck in(!) :

gem uninstall executable-hooks

Error loading RubyGems plugin "/home/user/.rvm/gems/ruby-1.8.6-p420/gems/executable-hooks-1.2.6/lib/rubygems_plugin.rb": uninitialized constant ExecutableHooks (NameError)
Error loading RubyGems plugin "/home/user/.rvm/gems/ruby-1.8.6-p420@global/gems/executable-hooks-1.2.5/lib/rubygems_plugin.rb": uninitialized constant ExecutableHooks (NameError)
/home/user/.rvm/rubies/ruby-1.8.6-p420/bin/gem:21: uninitialized constant Gem::GemRunner (NameError)
 

--
You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/1eIOjRY4e9s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubyonrails-ta...@googlegroups.com.

To post to this group, send email to rubyonra...@googlegroups.com.

Jordon Bedwell

unread,
Oct 23, 2013, 4:29:09 PM10/23/13
to rubyonra...@googlegroups.com
On Wed, Oct 23, 2013 at 3:19 PM, Ralph Vince <rvin...@gmail.com> wrote:
> Colin, yes, but this is the world I am stuck in(!) :
>
> gem uninstall executable-hooks
> Error loading RubyGems plugin
> "/home/user/.rvm/gems/ruby-1.8.6-p420/gems/executable-hooks-1.2.6/lib/rubygems_plugin.rb":
> uninitialized constant ExecutableHooks (NameError)
> Error loading RubyGems plugin
> "/home/user/.rvm/gems/ruby-1.8.6-p420@global/gems/executable-hooks-1.2.5/lib/rubygems_plugin.rb":
> uninitialized constant ExecutableHooks (NameError)
> /home/user/.rvm/rubies/ruby-1.8.6-p420/bin/gem:21: uninitialized constant
> Gem::GemRunner (NameError)

You are on RVM, just empty it and remove the Gem from your Gemfile and
move on, there are times when trying to figure out the problem is not
worth it because it's so highly localized and edgy compared to just
completing the easiest solution in fixing it, which in this case would
be just clearing the entire gemset and starting over.

Colin Law

unread,
Oct 23, 2013, 4:36:38 PM10/23/13
to rubyonra...@googlegroups.com
He has not got a Gemfile ( I assume) as he is using rails 2.

Ralph, I think you can just delete the executable-hooks folder, or
even just delete the complete ruby-1.8.... folder and install ruby in
rvm again.

When you re-install the gems make sure you install the specific
versions of the gems that your original app used. The problem may be
that if you installed the latest versions you may have got one that is
not compatible with rails 2 or with that ruby.

Colin

Ralph Vince

unread,
Oct 23, 2013, 5:22:32 PM10/23/13
to rubyonra...@googlegroups.com
Thanks Guys,

I dont seem to be able to find any file or folder on this entire, rather fresh, linux system named execute-hooks. I think the problem was that I first installed rails 2.3.2. Im going to try to reinstall everything all over again in the next 24 hours, starting with a fresh linux installations, using rails 1.3.7 instead. Based on what I am hearing from yor feedback, that should prevent the execute-hooks / versioning problems that percolated later up through my install (below, with rails not specified as 1.3.7). Can you please have a look and tell me if you see anything that looks glaringly wrong.Thanks for your help with this!

Install MySQL and  phpMyAdmin

sudo apt-get update
sudo apt-get install curl
curl -L get.rvm.io | bash -s stable --auto
. ~/.bash_profile
rvm requirements
rvm install 1.8.6
ruby -v
gem install rails -v 1.3.7

sudo apt-get install libpq-dev
sudo apt-get install libmysqlclient-dev
sudo apt-get install nodejs
gem install --remote mysql2
gem install --remote jdbc-mysql
gem install --remote authlogic --version 2.0.13
gem install --remote calendar_date_select --version 1.15
gem install --remote mongrel
gem install --remote paginator
gem install --remote pdf-writer
gem install --remote log4r
gem install --remote needle
gem install --remote nifty-generators
gem install --remote RedCloth
gem install --remote ruport
gem install --remote rubyzip --version 0.9.1
gem install --remote ruport-util
gem install --remote mailfactory
gem install --remote acts_as_reportable
gem list --local
then, from the top folder of the rails app itself:
ruby script/plugin install git://github.com/activescaffold/active_scaffold.git --force
ruby script/plugin install git://github.com/lackac/render_component.git -r rails-edge --force
ruby script/plugin install git://github.com/craigambrose/redbox.git --force



Hassan Schroeder

unread,
Oct 23, 2013, 6:01:25 PM10/23/13
to rubyonrails-talk
On Wed, Oct 23, 2013 at 2:22 PM, Ralph Vince <rvin...@gmail.com> wrote:

> I dont seem to be able to find any file or folder on this entire, rather
> fresh, linux system named execute-hooks. I think the problem was that I
> first installed rails 2.3.2. Im going to try to reinstall everything all
> over again in the next 24 hours, starting with a fresh linux installations,
> using rails 1.3.7 instead.

?? You originally said the app was developed using Rails 2.3.2.
And there is no such thing as "Rails 1.3.7"...

> sudo apt-get install libpq-dev

Why would you need that if you're using MySQL?

> gem install --remote jdbc-mysql

?! Unless you're actually using JRuby, which seems unlikely, why
would you think you need that?

If I were you, I would go back to the original machine and determine
which gems and gem versions the *running* app is actually using and
create an rvm gemset with exactly those (and only those) gems...

I don't know if bundler will work with such an old version of Ruby, but
creating a Gemfile would at least document your dependencies and
help you through upgrading.

Good luck,
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

Ralph Vince

unread,
Oct 23, 2013, 6:18:08 PM10/23/13
to rubyonra...@googlegroups.com
Thank you Hassan,

Yes, the dependencies I am putting in are from the original system BUT at one time that was set up to run JRuby, and I believe that is where my problem might be stemming.

Additionally, you are right about theire being no rails 1.3.7, that line should actually be the following lines:

rvm install rubygems 1.3.7

gem install rails -v 2.3.2

and hence my install script should now appear as:



sudo apt-get update
sudo apt-get install curl
curl -L get.rvm.io | bash -s stable --auto
. ~/.bash_profile
rvm requirements
rvm install 1.8.6
ruby -v
rvm install rubygems 1.3.7

gem install rails -v 2.3.2
sudo apt-get install libmysqlclient-dev
sudo apt-get install nodejs
gem install --remote mysql2
gem install --remote jdbc-mysql
gem install --remote authlogic --version 2.0.13
gem install --remote calendar_date_select --version 1.15
gem install --remote mongrel
gem install --remote paginator
gem install --remote pdf-writer
gem install --remote log4r
gem install --remote needle
gem install --remote nifty-generators
gem install --remote RedCloth
gem install --remote ruport
gem install --remote rubyzip --version 0.9.1
gem install --remote ruport-util
gem install --remote mailfactory
gem install --remote acts_as_reportable
gem list --local
then, from the top folder of the rails app itself:
ruby script/plugin install git://github.com/activescaffold/active_scaffold.git --force
ruby script/plugin install git://github.com/lackac/render_component.git -r rails-edge --force
ruby script/plugin install git://github.com/craigambrose/redbox.git --force




Thank You!

Colin Law

unread,
Oct 24, 2013, 4:20:13 AM10/24/13
to rubyonra...@googlegroups.com
On 23 October 2013 22:22, Ralph Vince <rvin...@gmail.com> wrote:
>
> I dont seem to be able to find any file or folder on this entire, rather
> fresh, linux system named execute-hooks.

Look at the error message:
Error loading RubyGems plugin "/home/user/.rvm/gems/ruby-1.
8.6-p420@global/gems/executable-hooks-1.2.5/lib/rubygems_plugin.rb":
uninitialized constant ExecutableHooks (NameError)
With rvm all the gems are under .rvm

> I think the problem was that I
> first installed rails 2.3.2. Im going to try to reinstall everything all
> over again in the next 24 hours, starting with a fresh linux installations,

There is certainly no need to re-install linux.
Check the versions of /all/ the gems and plugins on the old machine
and install exactly those versions.

Colin
Reply all
Reply to author
Forward
0 new messages