I'm maintaining an ancient RoR site that we're in the process of rewriting in Django. The site was written by someone else when Rails was in its infancy, and no one kept it updated until I got to it. A night or two ago, the server went down, I suspect due to a MySQL update. In the process of trying to fix it, we broke it, and now mongrel won't start. I see this in the mongrel log:
/home/USER/rails/SITE/config/boot.rb:26:Warning: Gem::SourcUSERdex#search support for String patterns is deprecated, use #find_name
/usr/local/lib/site_ruby/1.8/rubygems.rb:812:in `report_activate_error': RubyGem version error: rails(1.2.3 not >= 3.0) (Gem::LoadError)
from /usr/local/lib/site_ruby/1.8/rubygems.rb:223:in `activate'
from /usr/local/lib/site_ruby/1.8/rubygems.rb:258:in `activate'
from /usr/local/lib/site_ruby/1.8/rubygems.rb:257:in `each'
from /usr/local/lib/site_ruby/1.8/rubygems.rb:257:in `activate'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:33:in `require'
from /home/USER/rails/SITE/config/environment.rb:24
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:147:in `rails'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:113:in `cloaker_'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in `call'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in `listener'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:99:in `cloaker_'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `call'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `initialize'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `new'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `run'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
from /usr/local/bin/mongrel_rails:19:in `load'
from /usr/local/bin/mongrel_rails:19
I searched around and have tried to diagnose the error. It looks like mongrel wants us to have rails 3+ which isn't possible because we're going to be replacing the site in just a few weeks and don't want to bother bringing it up to date (it just needs to work for now). How can I force mongrel to run with the current version of rails?
In config/environment.rb, we have RAILS_GEM_VERSION = '1.2.3' unless defined? RAILS_GEM_VERSION which I thought would force Rails 1.2.3. Also, here's the output of gem list:
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.2.2, 3.0.3, 1.3.3)
actionpack (3.2.2, 3.0.3, 1.13.6, 1.13.3)
actionwebservice (1.2.6, 1.2.3)
activemodel (3.2.2, 3.0.3)
activerecord (3.2.2, 3.0.3, 1.15.6, 1.15.3)
activeresource (3.2.2, 3.0.3)
activesupport (3.2.2, 3.0.3, 1.4.4, 1.4.2)
acts_as_ferret (0.5.3, 0.4.3)
arel (3.0.2, 2.0.7)
builder (3.0.0, 2.1.2)
bundler (1.1.0, 1.0.9)
cgi_multipart_eof_fix (2.5.0)
daemons (1.1.8, 1.1.0)
erubis (2.7.0, 2.6.6)
fastthread (1.0.7)
ferret (0.11.6)
gem_plugin (0.2.3)
hike (1.2.1)
i18n (0.6.0, 0.5.0)
jk-ferret (0.11.8.3, 0.11.8.2)
journey (1.0.3)
json (1.6.5)
mail (2.4.3, 2.2.15)
mime-types (1.17.2, 1.16)
mongrel (1.1.5)
multi_json (1.1.0)
polyglot (0.3.3, 0.3.1)
rack (1.4.1, 1.2.1)
rack-cache (1.2)
rack-mount (0.8.3, 0.6.13)
rack-ssl (1.3.2)
rack-test (0.6.1, 0.5.7)
rails (1.2.3)
railties (3.2.2, 3.0.3)
rake (0.9.2.2, 0.8.7)
rdoc (3.12)
sprockets (2.1.2)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10, 1.4.9)
tzinfo (0.3.32, 0.3.24)
Thanks for any and all help!
OK, I figured it out. It was incompatible gem(s). Luckily, we have a test server and a production server. We only messed with the test server last night (mongrel on the production server was working), so I did gem list on both servers, and it turned out the test server had quite a different list. I just installed and uninstalled gems on the test server until gem list produced identical lists on both servers.
Mongrel does require the latest rails version available, but your apps require rails 1.2.3, so there is a conflict.
The easiest way to avoid gems conflicts is by using different gemsets (with rvm or rbenv). Or remove the rails 3 gem if it isn't used...
Related
I'm getting the error (below) when trying to push my project to Heroku. Googling found a few people with similar issues turning up, but with a different gem as the last gem before the error, so I don't think it's got to do with warden. A few of the similar errors/github issues I found had solutions pointing back to a rubygems error, which was apparently to be fixed in 1.8.10 (which I've got already, so I'm doubtful that it's that issue either.
Any suggestions would be appreciated—I'm sure it's something simple I've missed.
cobychapple at shiva in ~/code/zzz on master!
± git push heroku master
Counting objects: 201, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (181/181), done.
Writing objects: 100% (201/201), 92.14 KiB, done.
Total 201 (delta 38), reused 0 (delta 0)
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Detected Rails is not set to serve static_assets
Installing rails3_serve_static_assets... done
-----> Configure Rails 3 to disable x-sendfile
Installing rails3_disable_x_sendfile... done
-----> Configure Rails to log to stdout
Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
Unresolved dependencies detected; Installing...
Using --without development:test
Fetching source index for http://rubygems.org/
Installing rake (0.9.2.2)
Installing multi_json (1.0.3)
Installing activesupport (3.1.2)
Installing builder (3.0.0)
Installing i18n (0.6.0)
Installing activemodel (3.1.2)
Installing erubis (2.7.0)
Installing rack (1.3.5)
Installing rack-cache (1.1)
Installing rack-mount (0.8.3)
Installing rack-test (0.6.1)
Installing hike (1.2.1)
Installing tilt (1.3.3)
Installing sprockets (2.1.2)
Installing actionpack (3.1.2)
Installing mime-types (1.17.2)
Installing polyglot (0.3.3)
Installing treetop (1.4.10)
Installing mail (2.3.0)
Installing actionmailer (3.1.2)
Installing arel (2.2.1)
Installing tzinfo (0.3.31)
Installing activerecord (3.1.2)
Installing activeresource (3.1.2)
Installing addressable (2.2.6)
Installing bcrypt-ruby (3.0.1) with native extensions
Installing coffee-script-source (1.1.3)
Installing execjs (1.2.9)
Installing coffee-script (2.2.0)
Installing rack-ssl (1.3.2)
Installing json (1.6.1) with native extensions
Installing rdoc (3.11)
Installing thor (0.14.6)
Installing railties (3.1.2)
Installing coffee-rails (3.1.1)
Installing orm_adapter (0.0.5)
Installing warden (1.1.0)
/usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/specification.rb:519:in `normalize_yaml_input': invalid byte sequence in US-ASCII (ArgumentError)
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/specification.rb:479:in `from_yaml'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_input.rb:183:in `load_gemspec'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_input.rb:51:in `block in initialize'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_reader.rb:64:in `block in each'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_reader.rb:55:in `loop'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_reader.rb:55:in `each'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_input.rb:32:in `initialize'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_input.rb:17:in `new'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_input.rb:17:in `open'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package.rb:58:in `open'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/format.rb:63:in `from_io'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/format.rb:51:in `block in from_file_by_path'
from /usr/ruby1.9.2/lib/ruby/1.9.1/open-uri.rb:35:in `open'
from /usr/ruby1.9.2/lib/ruby/1.9.1/open-uri.rb:35:in `open'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/format.rb:50:in `from_file_by_path'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/source.rb:72:in `fetch'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:45:in `block in run'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `block in each'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:44:in `run'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:8:in `install'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/cli.rb:225:in `install'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in `start'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/bin/bundle:13:in `<top (required)>'
from /usr/ruby1.9.2/bin/bundle:19:in `load'
from /usr/ruby1.9.2/bin/bundle:19:in `<main>'
FAILED: http://devcenter.heroku.com/articles/bundler
! Heroku push rejected, failed to install gems via Bundler
To git#heroku.com:zzz.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:zzz.git'
Here's the output of bundle install too, in case it helps:
cobychapple at shiva in ~/code/zzz on master
± bundle install
Using rake (0.9.2.2)
Using multi_json (1.0.3)
Using activesupport (3.1.2)
Using builder (3.0.0)
Using i18n (0.6.0)
Using activemodel (3.1.2)
Using erubis (2.7.0)
Using rack (1.3.5)
Using rack-cache (1.1)
Using rack-mount (0.8.3)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.2)
Using actionpack (3.1.2)
Using mime-types (1.17.2)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.3.0)
Using actionmailer (3.1.2)
Using arel (2.2.1)
Using tzinfo (0.3.31)
Using activerecord (3.1.2)
Using activeresource (3.1.2)
Using addressable (2.2.6)
Using ansi (1.4.1)
Using bcrypt-ruby (3.0.1)
Using bundler (1.0.18)
Using coffee-script-source (1.1.3)
Using execjs (1.2.9)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using json (1.6.1)
Using rdoc (3.11)
Using thor (0.14.6)
Using railties (3.1.2)
Using coffee-rails (3.1.1)
Using orm_adapter (0.0.5)
Using warden (1.1.0)
Using devise (1.5.1)
Using faker (1.0.1)
Using rails (3.1.2)
Using formtastic (2.0.2)
Using formtastic-bootstrap (1.0.1)
Using haml (3.1.3)
Using launchy (2.0.5)
Using rest-client (1.6.7)
Using rubyzip (0.9.4)
Using term-ansicolor (1.0.7)
Using heroku (2.14.0)
Using jquery-rails (1.0.18)
Using kaminari (0.12.4)
Using populator (1.0.0)
Using sass (3.1.10)
Using sass-rails (3.1.5)
Using sequel (3.20.0)
Using sinatra (1.0)
Using sqlite3 (1.3.4)
Using sqlite3-ruby (1.3.3)
Using taps (0.3.23)
Using turn (0.8.2)
Using uglifier (1.1.0)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
Rubygems version:
cobychapple at shiva in ~/code/zzz on master
± gem -v
1.8.10
I had same issue and solved it by putting this on top of my Gemfile:
if RUBY_VERSION =~ /1.9/
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
end
as suggested in this post.
I meet a problem when I use jekyll to write static blog pages on GitHub(Ruby193):
Liquid error: incompatible character encodings: UTF-8 and ASCII-8BIT
I fixed this by change Ruby from Ruby 193 to Ruby187.
Newbie alert...
Trying to fix a problem with my rails webrick server (i.e. get it started), I used an old Stackoverflow answer old answer and did the following command
sudo install_name_tool -change libmysqlclient.16.dylib /usr/local/mysql/lib/libmysqlclient.16.dylib /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle
However, I forgot to change the version numbers. For example, my mysql is 0.3.6 (as opposed to the 0.2.6 in the command), and it is also libmysqlclient.18 instead of .16.
Now when I try to start rails server it says
Could not find gem 'mysql2 (~> 0.2.6)' in any of the gem sources listed in your Gemfile.
I tried to rerun this command with the updated versions but it didn't change anything...Indeed, it doesn't even ask me for my root password... Any ideas how I can reverse this problem?
Update -- this is the list of gems produced when I do gem list. The first person who answered this question suggested (in his comments) that I uninstall mysql .0.2.6 but that gem was never installed. When I did the name_tool command described above, it told the system to look for mysql 0.2.6, when I should have told it to look for mysql2-0.3.6.
abstract (1.0.0)
actionmailer (3.0.9, 3.0.7)
actionpack (3.0.9, 3.0.7)
activemodel (3.0.9, 3.0.7)
activerecord (3.0.9, 3.0.7)
activeresource (3.0.9, 3.0.7)
activesupport (3.0.9, 3.0.7)
arel (2.0.10)
builder (2.1.2)
bundler (1.0.14)
erubis (2.6.6)
i18n (0.5.0)
mail (2.2.19)
mime-types (1.16)
mysql2 (0.3.6)
polyglot (0.3.1)
rack (1.2.3)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (3.0.9, 3.0.7)
railties (3.0.9, 3.0.7)
rake (0.9.1)
rdoc (3.8)
rubygems-update (1.8.5)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.27)
Update --after following instructions in Eric Hu's answer, I got this result when I ran rails server from my project folder
2011-07-26 01:49:17 rails s
/Library/Ruby/Gems/1.8/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle
Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle
from /Library/Ruby/Gems/1.8/gems/mysql2-0.2.11/lib/mysql2.rb:9
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.14/lib/bundler/runtime.rb:68:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.14/lib/bundler/runtime.rb:68:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.14/lib/bundler/runtime.rb:66:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.14/lib/bundler/runtime.rb:66:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.14/lib/bundler/runtime.rb:55:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.14/lib/bundler/runtime.rb:55:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.14/lib/bundler.rb:120:in `require'
from /Users/michaelmitchell/Sites/simple_cms/config/application.rb:7
from /Library/Ruby/Gems/1.8/gems/railties-3.0.9/lib/rails/commands.rb:28:in `require'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.9/lib/rails/commands.rb:28
from /Library/Ruby/Gems/1.8/gems/railties-3.0.9/lib/rails/commands.rb:27:in `tap'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.9/lib/rails/commands.rb:27
from script/rails:6:in `require'
from script/rails:6
Update -- I did bundle list as Eric suggested in his comment
Gems included by the bundle:
* abstract (1.0.0)
* actionmailer (3.0.9)
* actionpack (3.0.9)
* activemodel (3.0.9)
* activerecord (3.0.9)
* activeresource (3.0.9)
* activesupport (3.0.9)
* arel (2.0.10)
* builder (2.1.2)
* bundler (1.0.14)
* erubis (2.6.6)
* i18n (0.5.0)
* mail (2.2.19)
* mime-types (1.16)
* mysql2 (0.2.11)
* polyglot (0.3.1)
* rack (1.2.3)
* rack-mount (0.6.14)
* rack-test (0.5.7)
* rails (3.0.9)
* railties (3.0.9)
* rake (0.9.2)
* rdoc (3.8)
* thor (0.14.6)
* treetop (1.4.9)
* tzinfo (0.3.29)
I believe you're experiencing confusion over using bundler and RubyGems. When you gem install <gemname>, you're using a RubyGems commands to install the newest version of <gemname>.
Rails projects come with a gem called bundler, which also manages gems. Bundler builds a separate copy of gems for each Rails project that you create a Gemfile for. If you don't recall making a Gemfile, that's because it's one of the files that rails new <projectname> will generate for you.
Most likely, you haven't run a bundle install. Before you do, go to the folder for your current Rails project and open up Gemfile, just so you know what's going on. I'm willing to bet there's a line in there like this: gem 'mysql2', '~> 0.2.6'
To install the right version, go to your project folder in the command line. Type bundle install. Give it a minute and that should be it--try running rails s again.
If this seems confusing and unnecessary, just remember that when someone updates a gem, they could make it change in ways that would break your program. Bundler does you a service by ensuring that your program is running with specific versions of the gems needed (in this case, mysql2-0.2.6 instead of mysql2-0.3.6).
Clean out that gem and reinstall it.
Alternatively, RVM + Mac Homebrew for the MySQL installation works wonders.
I did, gem install passenger, passenger-install-apache2-module
http://localhost/
I'm getting this error.
http://pastebin.com/YfrEsv3X
Update
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.0.8)
actionpack (3.0.8)
activemodel (3.0.8)
activerecord (3.0.8)
activeresource (3.0.8)
activesupport (3.0.8)
arel (2.1.1, 2.0.10)
bcrypt-ruby (2.1.4)
builder (3.0.0, 2.1.2)
bundle (0.0.1)
bundler (1.0.15)
daemon_controller (0.2.6)
devise (1.3.4)
erubis (2.7.0, 2.6.6)
fastthread (1.0.7)
i18n (0.6.0, 0.5.0)
mail (2.3.0, 2.2.19)
mime-types (1.16)
mysql (2.8.1)
mysql2 (0.3.2)
orm_adapter (0.0.5)
passenger (3.0.7)
pg (0.11.0)
polyglot (0.3.1)
postgres-pr (0.6.3)
rack (1.3.0, 1.2.3)
rack-mount (0.8.1, 0.6.14)
rack-test (0.6.0, 0.5.7)
rails (3.0.8)
railties (3.0.8)
rake (0.9.2, 0.8.7)
rubygems-update (1.8.5)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.27)
warden (1.0.4)
You need to install the bundler gem as well.
Update
Now that the OP has posted his gemset...
You must have two gemsets, usually this is because you're using two different rubys. The gem command is just a script, with a shebang line pointing to a Ruby. The gem list you're showing will be the gemset for that Ruby. You can see this with this command: head -1 $(which gem)
Your passenger configuration must be pointing to a different Ruby with a different gemset. You can see this in your passenger.conf lines for Apache.
I suspect after installing the bundler gem - you may experience other problems if your Gemfile doesn't include all the gems your project requires.
So next time - look at the error message.
no such file to load -- bundler
from the above example - you can notice that 'bundler' is causing the problem.
That will give you a clue as what other gems you'd need to install and possibly missed out in your Gemfile - in which case issue the command:
gem install <missing-gem>
I am trying to launch a rails application with mongrel on windows xp.
I believe the following error is version-specific but cannot pinpoint exactly what is missing (a gem overlooked perhaps or an incompatible version?)
My ruby version
C:\ruby -v
ruby 1.9.2p136 (2010-12-25) [i386-mingw32]
* LOCAL GEMS *
abstract (1.0.0)
actionmailer (3.0.4.rc1, 3.0.3, 2.2.3)
actionpack (3.0.4.rc1, 3.0.3, 2.2.3)
activemodel (3.0.4.rc1, 3.0.3)
activerecord (3.0.4.rc1, 3.0.3, 2.2.3)
activeresource (3.0.4.rc1, 3.0.3, 2.2.3)
activesupport (3.0.4.rc1, 3.0.3, 2.2.3)
arel (2.0.7)
builder (2.1.2)
bundler (1.0.10)
cgi_multipart_eof_fix (2.5.0)
erubis (2.6.6)
gem_plugin (0.2.3)
i18n (0.5.0)
mail (2.2.15)
mime-types (1.16)
minitest (1.6.0)
mongrel (1.2.0.pre2 x86-mingw32, 1.1.5 x86-mingw32)
mongrel_service (0.4.0)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack-test (0.5.7)
rails (3.0.4.rc1, 3.0.3, 2.2.3)
railties (3.0.4.rc1, 3.0.3)
rake (0.8.7)
rdoc (2.5.8)
rubygems-update (1.5.0)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.24)
In my working directory I attempt to start the app with this command:
mongrel_rails start -e development -b 127.0.0.1 -p 3000
The error is:
C:\myApp>mongrel_rails start -e development -a 127.0.0.1 -p 3000
** Starting Mongrel listening at 127.0.0.1:3000
** Starting Rails with development environment...
:29:in require': no such file to load--
C:/myApp/config/../vendor/rails/railties/lib/initializer (LoadError)
from <internal:lib/rubygems/custom_require>:29:inrequire'
from C:/myApp/config/boot.rb:45:in load_initializer'
from C:/myApp/config/boot.rb:38:inrun'
from C:/myApp/config/boot.rb:11:in boot!'
from C:/myApp/config/boot.rb:109:in'
from :29:in require'
from <internal:lib/rubygems/custom_require>:29:inrequire'
from C:/myApp/config/environment.rb:11:in <top (required)>'
from <internal:lib/rubygems/custom_require>:29:inrequire'
from :29:in require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
lib/mongrel/rails.rb:147:inrails'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
bin/mongrel_rails:116:in block (2 levels) in run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
lib/mongrel/configurator.rb:149:incall'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
lib/mongrel/configurator.rb:149:in listener'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
bin/mongrel_rails:102:inblock in run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
lib/mongrel/configurator.rb:50:in call'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
lib/mongrel/configurator.rb:50:ininitialize'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
bin/mongrel_rails:86:in new'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
bin/mongrel_rails:86:inrun'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
lib/mongrel/command.rb:210:in run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
bin/mongrel_rails:282:in'
from C:/Ruby192/bin/mongrel_rails:19:in load'
from C:/Ruby192/bin/mongrel_rails:19:in'
Any ideas or direction on how to about resolving this will much appreciated.If I am missing a file or gem, or if it is a version conflict, it is not clear which one is it.
Also given the different versions on the same gem installed, how could I start the rails app on mongrel specifying exactly what versions I want to use?
Thanks!
would you please paste the contents of your gem file?
make sure you have:
gem 'mongrel', '>= 1.2.0.pre2'
then run bundle install to update your gem.
run server: rails server mongrel
I have a local development machine which has started to give me the following error on starting up the Rails server:
C:/Software/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/i
nflector.rb:404: uninitialized constant ActiveSupport::CoreExtensions::String (N
ameError)
from C:/Software/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `gem_original_require'
from C:/Software/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `require'
No Rails specific updates have been made on this machine, only automatic Windows updates.
Anyone have a clue on this? I cannot upgrade to Rails 2.3.5.
Thanks!
Vikram
gem list gives:
actionmailer (2.3.5, 2.3.4, 2.3.2, 2.2.2, 2.1.0)
actionpack (2.3.5, 2.3.4, 2.3.2, 2.2.2, 2.1.0)
activerecord (2.3.4, 2.3.2, 2.2.2, 2.1.0)
activeresource (2.3.5, 2.3.4, 2.3.2, 2.2.2, 2.1.0)
activesupport (2.3.5, 2.3.4, 2.3.2, 2.2.2, 2.1.0)
bullet (1.7.1)
capistrano (2.5.5, 2.5.0)
cgi_multipart_eof_fix (2.5.0)
echoe (3.1.1)
facebooker (1.0.54)
gem_plugin (0.2.3)
highline (1.5.0, 1.4.0)
json (1.1.9)
json_pure (1.2.0)
memcache-client (1.7.4)
mime-types (1.16)
mislav-will_paginate (2.3.11, 2.3.8, 2.3.4)
mongrel (1.1.5)
mysql (2.7.3)
net-scp (1.0.2, 1.0.1)
net-sftp (2.0.2, 2.0.1)
net-ssh (2.0.11, 2.0.4)
net-ssh-gateway (1.0.1, 1.0.0)
parseexcel (0.5.2)
rack (1.1.0, 1.0.1, 1.0.0)
rails (2.3.4, 2.3.2, 2.2.2)
rake (0.8.7, 0.8.4, 0.8.2)
rmagick (2.6.0)
rubyforge (2.0.3, 1.0.3)
rubyzip (0.9.1)
spreadsheet-excel (0.3.5.1)
Are you trying to upgrade to rails 2.3.5? If so you may want to upgrade your ActiveRecord to 2.3.5 as well (as well as install the 2.3.5 rails gems).
If not, you may want to uninstall your 2.3.5 versions of actionmailer, actionpack, activerecord, activeresource, activesupport and see if that helps.
Just to let everyone know. The error was due to a power outage that caused the computer to shut down incorrectly, and which corrupted some of the files on the machine.
Uninstalling every Rails version and dependencies, and reinstalling them fixed the issue (although uninstalling just the version that was being used could also have done the trick).
Vikram