Old rails project, new machine

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

On 23 October 2013 13:44, RVic [email protected] wrote:

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

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:inboot!’

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)

On 23 October 2013 14:14, RVic [email protected] wrote:

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
Then check with gem -v

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

Colin

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:inboot!’

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 23 October 2013 15:53, RVic [email protected] 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.

uninitialized constant ExecutableHooks (NameError)
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

On Wednesday, October 23, 2013 11:26:51 AM UTC-4, Colin L. wrote:

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.

On 23 October 2013 17:44, RVic [email protected] wrote:

On Wednesday, October 23, 2013 11:26:51 AM UTC-4, Colin L. wrote:

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.

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

On Wed, Oct 23, 2013 at 3:43 PM, Colin L. [email protected]
wrote:

this thing was written!). How would I get rid of that? Thanks.

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

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

On 23 October 2013 20:59, Ralph V. [email protected] wrote:

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

fire up this rails app for a few days now, and am entirely unable to get
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!

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] All versions of executable-hooks | RubyGems.org | your community gem host

On Wed, Oct 23, 2013 at 3:19 PM, Ralph V. [email protected] wrote:

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

[1] All versions of executable-hooks | RubyGems.org | your community gem host

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)

On 23 October 2013 21:29, Jordon B. [email protected] wrote:

/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.

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

On Wed, Oct 23, 2013 at 4:36 PM, Colin L. [email protected]
wrote:

"/home/user/.rvm/gems/ruby-1.8.6-p420@global
be just clearing the entire gemset and starting over.
not compatible with rails 2 or with that ruby.

Colin

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 - activescaffold/active_scaffold: Save time and headaches, and create a more easily maintainable set of pages, with ActiveScaffold. ActiveScaffold handles all your CRUD (create, read, update, delete) user interface needs, leaving you more time to focus on more challenging (and interesting!) problems. --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

On Wed, Oct 23, 2013 at 6:01 PM, Hassan S. <

On Wed, Oct 23, 2013 at 2:22 PM, Ralph V. [email protected] 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 S. ------------------------ [email protected]

twitter: @hassan

On 23 October 2013 22:22, Ralph V. [email protected] 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.

curl -L get.rvm.io | bash -s stable --auto
gem install --remote jdbc-mysql
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

Check the versions of /all/ the gems and plugins on the old machine
and install exactly those versions.

Colin