Run kaminari specs - ruby

this is probably a stupid question but I can't seem to find the answer.
I'd like to contribute to kaminari, so I forked the repo, bundle'd it, and now I would like to run the specs to ensure all's green. But I can't seem to make it work :
bin/rake spec
/Users/Ksoltysiak/.rbenv/versions/1.9.3-p125/bin/ruby -S rspec spec/config/config_spec.rb spec/helpers/action_view_extension_spec.rb spec/helpers/helpers_spec.rb spec/helpers/sinatra_helpers_spec.rb spec/helpers/tags_spec.rb spec/models/active_record/active_record_relation_methods_spec.rb spec/models/active_record/default_per_page_spec.rb spec/models/active_record/scopes_spec.rb spec/models/array_spec.rb spec/models/data_mapper/data_mapper_spec.rb spec/models/mongo_mapper/mongo_mapper_spec.rb spec/models/mongoid/mongoid_spec.rb spec/requests/users_spec.rb
warning: no framework detected.
would you check out if your Gemfile appropriately configured?
---- e.g. ----
when Rails:
gem 'kaminari'
when Sinatra/Padrino:
gem 'kaminari', :require => 'kaminari/sinatra'
when Grape:
gem 'kaminari', :require => 'kaminari/grape'
/Users/Ksoltysiak/Documents/Repositories/kaminari/spec/models/array_spec.rb:3:in `<top (required)>': uninitialized constant Kaminari::PaginatableArray (NameError)
from /Users/Ksoltysiak/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `load'
from /Users/Ksoltysiak/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `block in load_spec_files'
from /Users/Ksoltysiak/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `map'
from /Users/Ksoltysiak/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `load_spec_files'
from /Users/Ksoltysiak/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/command_line.rb:22:in `run'
from /Users/Ksoltysiak/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:69:in `run'
from /Users/Ksoltysiak/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:10:in `block in autorun'
rake aborted!
/Users/Ksoltysiak/.rbenv/versions/1.9.3-p125/bin/ruby -S rspec spec/config/config_spec.rb spec/helpers/action_view_extension_spec.rb spec/helpers/helpers_spec.rb spec/helpers/sinatra_helpers_spec.rb spec/helpers/tags_spec.rb spec/models/active_record/active_record_relation_methods_spec.rb spec/models/active_record/default_per_page_spec.rb spec/models/active_record/scopes_spec.rb spec/models/array_spec.rb spec/models/data_mapper/data_mapper_spec.rb spec/models/mongo_mapper/mongo_mapper_spec.rb spec/models/mongoid/mongoid_spec.rb spec/requests/users_spec.rb failed
I tried to bypass bundler, but then I got gems issues with versions and stuff. So what am I missing here ? I don't find anything on the wiki or the issues, or even here about this.
Thanks for your time!

I recently made series of changes on Kaminari tests. https://github.com/amatsuda/kaminari/compare/b61db76...1f8389ae
As a result of this big refactoring, now the tests can be run separately per each ORM library, for example like this:
BUNDLE_GEMFILE=gemfiles/active_record_32.gemfile bundle exec rake spec
To run all tests at once, you should invoke spec:all task:
bundle exec rake spec:all
I'm aware that this is a bit unusual. At least it apparently needs to be documented. I'll do so till the next stable release.
Or if you have any better solution, please tell me.

Related

RubyMine unable to recognize rake gem

I can’t get rubymine to run my tests even though they work fine on the command line. The problems seem to have started after upgrading some gems. When I hit ctrl+shft+F10 I get this:
/Users/williamjeffries/.rbenv/shims/bundle exec /Users/williamjeffries/.rbenv/versions/2.2.3/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/williamjeffries/code/myr-admin/bin/spring rspec /Users/williamjeffries/code/myr-admin/spec/controllers/orders_controller_spec.rb --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter --example "OrdersController a single order a credit card order captured order"
Testing started at 6:08 PM ...
/Users/williamjeffries/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.13.1/lib/bundler/definition.rb:181:in `rescue in specs': Your bundle is locked to rake (12.0.0), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of rake (12.0.0) has removed it. You'll need to update your bundle to a different version of rake (12.0.0) that hasn't been removed in order to install. (Bundler::GemNotFound)
from /Users/williamjeffries/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.13.1/lib/bundler/definition.rb:175:in `specs'
from /Users/williamjeffries/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.13.1/lib/bundler/definition.rb:235:in `specs_for'
from /Users/williamjeffries/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.13.1/lib/bundler/definition.rb:224:in `requested_specs'
from /Users/williamjeffries/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.13.1/lib/bundler/runtime.rb:118:in `block in definition_method'
from /Users/williamjeffries/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.13.1/lib/bundler/runtime.rb:19:in `setup'
from /Users/williamjeffries/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.13.1/lib/bundler.rb:99:in `setup'
from /Users/williamjeffries/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.13.1/lib/bundler/setup.rb:20:in `<top (required)>'
from /Users/williamjeffries/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/williamjeffries/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
Process finished with exit code 1
It seems to think I don’t have rake 12.0.0 but a gem list rake reveals that I do:
$ gem list rake
*** LOCAL GEMS ***
rake (12.0.0, 11.2.2, 10.4.2)
I double checked and at time of posting, 12.0.0 is in fact both a valid version and the most recent stable build for rake: https://github.com/ruby/rake/releases
Any ideas why this might be failing and how to get RubyMine to run my tests successfully again?
The solution was to restart RubyMine.

Cannot run rspec anymore

I had ruby 2.0 with rspec 3.0. I uninstalled all rspec 3.0 gems and replaced them with 2.0. I did this to get rid of deprecation warnings. Now, my specs are not working. I am getting the error below. What does the error tell me and how do i fix it ? None of the stack overflow posts on this were helpful.
/zombie/spec/spec_helper.rb:29:in `block (2 levels) in <top (required)>': undefined method `include_chain_clauses_in_custom_matcher_descriptions=' for #<RSpec::Matchers::Configuration:0x00000001a73928> (NoMethodError)
from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:398:in `expect_with'
from /home/lsusr/Code/Rspec/zombie/spec/spec_helper.rb:21:in `block in <top (required)>'
from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core.rb:92:in `configure'
from /home/lsusr/Code/Rspec/zombie/spec/spec_helper.rb:17:in `<top (required)>'
from /home/lsusr/.rvm/rubies/ruby-2.0.0-p598/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/lsusr/.rvm/rubies/ruby-2.0.0-p598/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:434:in `block in requires='
from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:434:in `map'
from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:434:in `requires='
from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core/configuration_options.rb:20:in `block in configure'
from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core/configuration_options.rb:19:in `each'
from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core/configuration_options.rb:19:in `configure'
from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:21:in `run'
from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:69:in `run'
from /home/lsusr/.rvm/gems/ruby-2.0.0-p598/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:8:in `block in autorun'
Okay, I found a fix.
I just removed all the unnecessary gems using
for i in `gem list --no-versions`; do gem uninstall -aIx $i; done
Then, I just reinstalled rspec using gem install rspec which gave me rspec 3.0 and fixed all the problems. But, i get the deprecation warnings again.
Please tell me why the error occurred. The tutorial author said that it should work with rspec 2.10.0 or higher.
The tutorial author said that it should work with rspec 2.10.0 or higher.
Likely the author meant 2.10 or higher, within the 2.x range. RSpec 3.x has breaking changes.
Try uninstalling the gems like you did before, then this:
gem install rspec '>=2.10', '<3'
Then run your code.
The deprecation warnings that happen when you use RSpec 3 are not bad; they are coaching to tell you that the RSpec methods that you are calling are going to be phased out. These kinds of warnings are typical and fine when moving an entire version number e.g. 2.x to 3.x.
The errors you get when you use RSpec 2.0 are because that's a very old version, and the method you're calling didn't exist in 2.0. This is probably why the tutorial author said to use 2.10 or higher.
Most likely the tutorial is out of date, so the best solution is to wrote the tutorial author and let him/her know to update it.
If you're curious about how RSpec does its version numbers, here's a link to Semantic Versioning.

Failing to run RSpec (uninitialized constant User (NameError)

Trying to run bundle exec rspec spec/models/user_spec.rb but failing to execute (see error below).
Contents of user_spec.rb:
require 'rails_helper'
describe User do
pending "add some examples to (or delete) #{__FILE__}"
end
If I remove the last 3 lines, then it complete with 0 examples and 0 failures. However, when the last 3 lines are present, it generates an error
/spec/models/user_spec.rb:4:in `<top (required)>': uninitialized constant User (NameError)
from /var/lib/gems/1.9.1/gems/rspec-core-3.0.3/lib/rspec/core/configuration.rb:1057:in `load'
from /var/lib/gems/1.9.1/gems/rspec-core-3.0.3/lib/rspec/core/configuration.rb:1057:in `block in load_spec_files'
from /var/lib/gems/1.9.1/gems/rspec-core-3.0.3/lib/rspec/core/configuration.rb:1057:in `each'
from /var/lib/gems/1.9.1/gems/rspec-core-3.0.3/lib/rspec/core/configuration.rb:1057:in `load_spec_files'
from /var/lib/gems/1.9.1/gems/rspec-core-3.0.3/lib/rspec/core/runner.rb:97:in `setup'
from /var/lib/gems/1.9.1/gems/rspec-core-3.0.3/lib/rspec/core/runner.rb:85:in `run'
from /var/lib/gems/1.9.1/gems/rspec-core-3.0.3/lib/rspec/core/runner.rb:70:in `run'
from /var/lib/gems/1.9.1/gems/rspec-core-3.0.3/lib/rspec/core/runner.rb:38:in `invoke'
from /var/lib/gems/1.9.1/gems/rspec-core-3.0.3/exe/rspec:4:in `<top (required)>'
from /usr/local/bin/rspec:23:in `load'
from /usr/local/bin/rspec:23:in `<main>'
It seems it doesn't know what User is and treats it as a constant, when this is infact a model. I have verified in the ruby sandbox that I can create new Users in the database. Any ideas?
Answer:
After removing --warnings from .rspec (thank you kirti), current error was about capybara version being too low (requires 2.2). After installing the latest version (modifying gemfile and bundle install), rspec appears to be executing correctly. Thank you to all for your comments.
I had the same issue, this was due to rspec/rails_helper.rb not being called anywhere.
I added it to the .rspec file, so my file look like this
--color
--require spec_helper
--require rails_helper
This and adding warnings to false in the spec/spec_helper.rb solved it for me !
config.warnings = false
After removing --warnings from .rspec (thank you kirti), current error was about capybara version being too low (requires 2.2). After installing the latest version (modifying gemfile and bundle install), rspec appears to be executing correctly. Thank you to all for your comments.
For me, the issue was that the name of the class was not being correctly called due to it being in another namespace. For example, I had:
RSpec.describe User do
# ... some tests
end
where I should have had
RSpec.describe MyModule::User do
# ... some tests
end
because the user class was defined with the MyModule module.

Unable to run serverspec due to gem being unable to load

I'm trying to play around with serverspec, however it seems I have some weird gem error that I cannot pinpoint.
$ rake spec
/usr/bin/ruby -I/usr/lib/ruby/gems/1.8/gems/rspec-support-3.0.2/lib:/usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/lib -S /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/exe/rspec spec/localhost/httpd_spec.rb
/home/mikolajewskim/puppet-master/spec/spec_helper.rb:1:in `require': no such file to load -- serverspec (LoadError)
from /home/mikolajewskim/puppet-master/spec/spec_helper.rb:1
from /home/mikolajewskim/puppet-master/spec/localhost/httpd_spec.rb:1:in `require'
from /home/mikolajewskim/puppet-master/spec/localhost/httpd_spec.rb:1
from /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1057:in `load'
from /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1057:in `load_spec_files'
from /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1057:in `each'
from /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/lib/rspec/core/configuration.rb:1057:in `load_spec_files'
from /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:97:in `setup'
from /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:85:in `run'
from /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:70:in `run'
from /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/lib/rspec/core/runner.rb:38:in `invoke'
from /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/exe/rspec:4
/usr/bin/ruby -I/usr/lib/ruby/gems/1.8/gems/rspec-support-3.0.2/lib:/usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/lib -S /usr/lib/ruby/gems/1.8/gems/rspec-core-3.0.2/exe/rspec spec/localhost/httpd_spec.rb failed
Still, when I look at the list of gems, serverspec is there (1.9.0). I've also checked it's existance in gems directory. I'm running a system version of ruby 1.8.7 and I do not have multiple ruby installations.
I'm not really sure where to go from here. Thanks in advance for any help.
What helped was:
1) Upgrading ruby package on the system (still 1.8.7).
2) Upgrading rubygems.
3) Removing all gems.
4) Installing serverspec and rake again.

LoadError running Mongrel with Rails3 and Ruby 1.9.2

I am new to programming (previously only did html/css/design) trying to start learning RoR via the book Simply Rails 2. However I want to start with the most recent versions of Ruby(1.9.2) and Rails (3) so I am forced to get everything configured without the book. I have looked a lot via google and on stackoverflow. When I run rails server it automatically uses Webrick, but I want to be using Mongrel. I installed the prerelease Mongrel via gem install mongrel --pre and removed the previous version. I read that in order to get Mongrel to work with rails server I had to add gem 'mongrel' to the Gemfile, but I do not know which one I should be adding it to (I tried several but nothing changed). So I decided to look at mongrel documentation via git and learned about mongrel_rails start when I run that I get this:
C:\Ruby192\shovell>mongrel_rails start
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment... C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0.rc.6/lib/bundler/runtime.rb:27:in
'block in setup': You have already activated mongrel 1.2.
0.pre2, but your Gemfile requires mongrel 1.1.5. Consider using bundle exec. (Gem::LoadError)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0.rc.6/lib/bundler/spec_set.rb:12:in
'block in each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0.rc.6/lib/bundler/spec_set.rb:12:in
'each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0.rc.6/lib/bundler/spec_set.rb:12:in
'each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0.rc.6/lib/bundler/runtime.rb:17:in
'setup'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0.rc.6/lib/bundler.rb:100:in
'setup'
from C:/Ruby192/shovell/config/boot.rb:8:in '<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in 'require'
from <internal:lib/rubygems/custom_require>:29:in 'require'
from C:/Ruby192/shovell/config/application.rb:1:in '<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in 'require'
from <internal:lib/rubygems/custom_require>:29:in 'require'
from C:/Ruby192/shovell/config/environment.rb:2:in '<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in 'require'
from <internal:lib/rubygems/custom_require>: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:in
'rails'
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:in
'call'
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:in
'block 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:in
'initialize'
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:in
'run'
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
'<top (required)>'
from C:/Ruby192/bin/mongrel_rails:19:in 'load'
from C:/Ruby192/bin/mongrel_rails:19:in '<main>'`
My best guess is that
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.0.rc.6/lib/bundler/runtime.rb:27:in
'block in setup': You have already activated mongrel 1.2.
0.pre2, but your Gemfile requires mongrel 1.1.5. Consider using bundle exec. is the key but I have not been able to solve it.
I would appreciate any help so that I can get on to actually learning
the language!
EDIT: I was able to get past the above issue thanks to #duddle but now I have another issue...I am getting this error:
C:\Ruby192\shovell>mongrel_rails start
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment... C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0.rc2/lib/active_support/dependencies.rb:239:in
'req uire': no such file to load -- dispatcher (LoadError)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0.rc2/lib/active_support/dependencies.rb:239:in 'block in require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0.rc2/lib/active_support/dependencies.rb:225:in 'block in load_dependency'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0.rc2/lib/active_support/dependencies.rb:591:in 'new_constants_in'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0.rc2/lib/active_support/dependencies.rb:225:in 'load_dependency'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0.rc2/lib/active_support/dependencies.rb:239:in 'require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/lib/mongrel/rails.rb:148:in 'rails'
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:in 'call'
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:in' block 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:in 'initialize'
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:in'run'
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 '<top (required)>'
from C:/Ruby192/bin/mongrel_rails:19:in 'load'
from C:/Ruby192/bin/mongrel_rails:19:in '<main>
My best guess at this point (1am...very tired) is that I am missing a file or something is not named as it should be..maybe i need to use the :require action in my Gemfile..maybe I just need to sleep on it. Ha.
Again, thanks a ton #duddle for getting me past the first error! Any more help is greatly appreciated!
You have already activated mongrel 1.2. 0.pre2, but your Gemfile requires mongrel 1.1.5. Consider using bundle exec. is the key but I have not been able to solve it.
You were almost there!
gem 'mongrel', '>= 1.2.0.pre2'
The second parameter tells bundler to require a version equal to or greater than 1.2.0.pre2, which you have to use when using Ruby 1.9.2.
The Bundler page provides a nice reference on how to use the Gemfile: http://gembundler.com/gemfile.html
Just in case you didn't figure it out.
I ran gem install 'dispatcher' and added gem 'dispatcher' in the Gemfile of my app.
Then everything was fine.
From the small experience I have with ruby, everytime I have a "require -- no such file to load" problem. It is because I am missing a specific gem.
Hth...
add this line to your gem file:
gem 'mongrel', '>= 1.2.0.pre2'
at the command prompt:
run bundle install
start mongrel using this command:
rails server
Hey, I ran into that problem, the solution was quite simple:
Just add the gem 'dispatch'
;-)
The mongrel gem isn’t compatible with Ruby 1.9.2; you’ll have to use gem 'sho-mongrel' in its place.
Try to install it using:
gem install mongrel --pre
It worked for me perfect!!!

Resources