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
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
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:
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.
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!
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!
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].
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].
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.
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!
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.
> 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.schroeder@gmail.com
Hassan Schroeder | about.me
twitter: @hassan
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:
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.
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!