Rails 4.1.0 and authlogic bcrypt issue - ruby-on-rails

I'm running the latest OSX with rvm ruby 2.1.0. After bundle update to Rails 4.1.0 and authlogic 3.4.1, when I start the server I get this error:
authlogic/crypto_providers/bcrypt.rb:1:in `require': cannot load such file -- bcrypt (LoadError)
authlogic-3.4.1/lib/authlogic/crypto_providers/bcrypt.rb:1:in `<top (required)>'
authlogic-3.4.1/lib/authlogic.rb:60:in `require'
authlogic-3.4.1/lib/authlogic.rb:60:in `block in <top (required)>'
authlogic-3.4.1/lib/authlogic.rb:59:in `each'
authlogic-3.4.1/lib/authlogic.rb:59:in `<top (required)>'
bundler-1.5.2/lib/bundler/runtime.rb:76:in `require'
bundler-1.5.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
bundler-1.5.2/lib/bundler/runtime.rb:72:in `each'
bundler-1.5.2/lib/bundler/runtime.rb:72:in `block in require'
bundler-1.5.2/lib/bundler/runtime.rb:61:in `each'
bundler-1.5.2/lib/bundler/runtime.rb:61:in `require'
bundler-1.5.2/lib/bundler.rb:131:in `require'
application.rb:7:in `<top (required)>'
railties-4.1.0/lib/rails/commands/commands_tasks.rb:79:in `require'
railties-4.1.0/lib/rails/commands/commands_tasks.rb:79:in `block in server'
railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `tap'
railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `server'
railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
railties-4.1.0/lib/rails/commands.rb:17:in `<top (required)>'

From this issue on the authlogic github account
Authlogic has changed its default encryption system from SHA512 to SCrypt.
It seems that you need this in your gemfile
gem 'authlogic', '~> 3.4.0'
gem 'scrypt'
If you don't want SCrypt you can use Sha512 by putting this
acts_as_authentic do |c|
c.crypto_provider = Authlogic::CryptoProviders::Sha512
end
in your User.rb
You also might need to specify the version of the authlogic gem
gem 'authlogic', github: 'binarylogic/authlogic', ref: 'e4b2990d6282f3f7b50249b4f639631aef68b939'
but I guess this will be fixed soon

Related

cannot load such file -- bcrypt_ext (LoadError) on windows

I have ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32] and rails 5.1.4. I am getting following error when i run rails s command.
rails s
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require': cannot load such file -- bcrypt_ext (LoadError)
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x64-mingw32/lib/bcrypt.rb:16:in `rescue in <top (required)>'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x64-mingw32/lib/bcrypt.rb:12:in `<top (required)>'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:83:in `require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:83:in `block (2 levels) in require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:78:in `each'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:78:in `block in require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:67:in `each'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:67:in `require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0.pre.2/lib/bundler.rb:114:in `require'
from E:/Rauf Personal Data/work/rails/shine/config/application.rb:7:in `<top (required)>'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:133:in `require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:133:in `block in perform'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:130:in `tap'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:130:in `perform'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command.rb:44:in `invoke'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I have almost tried every solution but i am unable to resolve this issue. Can any body please help me to sort out this issue. I already tried following:
Firstly uninstall bcrypt and bcrypt-ruby by running these two commands:
gem uninstall bcrypt and gem uninstall bcrypt-ruby
Install it again with gem install bcrypt --platform=ruby
In your Gemfile write gem 'bcrypt-ruby', '3.1.5', :require => 'bcrypt'
Run bundle install
I have managed to solve this issue by adding following line in the Gemfile....
gem 'bcrypt', git: 'https://github.com/codahale/bcrypt-ruby.git', :require => 'bcrypt'
After trying several methods, the above worked for me:
1) Stop all rails servers.
2) Add : gem 'bcrypt', git: 'https://github.com/codahale/bcrypt-ruby.git', :require => 'bcrypt' to the gemfile.
3) bundle install.

Bcrypt gem in Ruby on Rails

I've just created a fresh Rails 5 application. I don't have any MVC's generated yet inside my application.
I added some gems to the gem file including gem 'bcrypt', '3.1.11'.
When I try to create a controller with the rails generator, I get an error.
This is the command with the error that I got:
command>rails generate controller StaticPages home help
C:/Ruby23/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:16:in `require': cannot load such file -- bcrypt_ext (LoadError)
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:16:in `rescue in <top (required)>'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:12:in `<top (required)>'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `require'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `each'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `block in require'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `each'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `require'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:106:in `require'
from C:/Users/Doesha/Desktop/rails17/rails_sample_app/config/application.rb:7:in `<top (required)>'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:156:in `require'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:156:in `require_application_and_environment!'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:143:in `generate_or_destroy'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:60:in `generate'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from C:/Ruby23/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
All I did was add gems to my gemfile, so I'm not sure why the rails generator isn't working.
I did notice that my generator stops working when I add the gem bcrypt.
Can someone tell me the reason I can't use my generator once I installed gem 'bcrypt', '3.1.11'?
delete gem 'bcrypt', '3.1.11' from gem file and
use
$gem install bcrypt

uninitialized constant ActiveMerchant::Billing::CreditCard::Validateable (NameError) - in Spree shop

i'm new in rails. Today i tried deploy my shop(SpreeShop) to new production server, but somthing was wrong. I have foolowing problem with some gem: activemerchant (1.34.1).
Bellow is my stack trace.
uninitialized constant ActiveMerchant::Billing::CreditCard::Validateable (NameError)
/home/dp/.rvm/gems/ruby-1.9.3-p429#dp/gems/activemerchant-1.34.1/lib/active_merchant/billing/credit_card.rb:51:in `<class:CreditCard>'
/home/dp/.rvm/gems/ruby-1.9.3-p429#dp/gems/activemerchant-1.34.1/lib/active_merchant/billing/credit_card.rb:49:in `<module:Billing>'
/home/dp/.rvm/gems/ruby-1.9.3-p429#dp/gems/activemerchant-1.34.1/lib/active_merchant/billing/credit_card.rb:6:in `<module:ActiveMerchant>'
/home/dp/.rvm/gems/ruby-1.9.3-p429#dp/gems/activemerchant-1.34.1/lib/active_merchant/billing/credit_card.rb:5:in `<top (required)>'
/home/dp/.rvm/gems/ruby-1.9.3-p429#dp/gems/activemerchant-1.34.1/lib/active_merchant/billing.rb:5:in `<top (required)>'
/home/dp/.rvm/gems/ruby-1.9.3-p429#dp/gems/activemerchant-1.34.1/lib/active_merchant.rb:56:in `<top (required)>'
/home/dp/.rvm/gems/ruby-1.9.3-p429#dp/bundler/gems/spree-3a3652adb1e8/core/lib/spree/core.rb:8:in `<top (required)>'
/home/dp/.rvm/gems/ruby-1.9.3-p429#dp/bundler/gems/spree-3a3652adb1e8/core/lib/spree_core.rb:1:in `require'
/home/dp/.rvm/gems/ruby-1.9.3-p429#dp/bundler/gems/spree-3a3652adb1e8/core/lib/spree_core.rb:1:in `<top (required)>'
/home/dp/.rvm/gems/ruby-1.9.3-p429#dp/bundler/gems/spree-3a3652adb1e8/lib/spree.rb:1:in `require'
/home/dp/.rvm/gems/ruby-1.9.3-p429#dp/bundler/gems/spree-3a3652adb1e8/lib/spree.rb:1:in `<top (required)>'
/home/dp/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
/home/dp/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
/home/dp/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
/home/dp/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
/home/dp/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
/home/dp/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
/home/dp/.rvm/gems/ruby-1.9.3-p429#global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
/home/dp/dp/releases/20150607162220/config/application.rb:7:in `<top (required)>'
/home/dp/dp/releases/20150607162220/config/environment.rb:2:in `require'
/home/dp/dp/releases/20150607162220/config/environment.rb:2:in `<top (required)>'
config.ru:3:in `require'
config.ru:3:in `block in <main>'
/home/dp/.rvm/gems/ruby-1.9.3-p429#dp/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
/home/dp/.rvm/gems/ruby-1.9.3-p429#dp/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/home/dp/.rvm/gems/ruby-1.9.3-p429#quiselle/gems/passenger-4.0.26/helper-scripts/rack-preloader.rb:105:in `eval'
/home/dp/.rvm/gems/ruby-1.9.3-p429#dp/gems/passenger-4.0.26/helper-scripts/rack-preloader.rb:105:in `preload_app'
/home/dp/.rvm/gems/ruby-1.9.3-p429#dp/gems/passenger-4.0.26/helper-scripts/rack-preloader.rb:150:in `<module:App>'
/home/dp/.rvm/gems/ruby-1.9.3-p429#dp/gems/passenger-4.0.26/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/home/dp/.rvm/gems/ruby-1.9.3-p429#dp/gems/passenger-4.0.26/helper-scripts/rack-preloader.rb:28:in `<main>'
Do you have any idea how to resolve this problem??? I was read another post with similar problems but nothing wasnt helpfull....
The uninitialized constant ActiveMerchant::Billing::CreditCard::Validateable issue is with the version of active_utils gem. Version 3 throws the error; version 2 does not. You need to set the gem version in your Gemfile.
# Gemfile
gem 'active_utils', '2.0.2'
gem 'activemerchant', '~> 1.32.1', require: 'active_merchant'
This is the same issue detailed at https://github.com/Shopify/active_utils/issues/57 .
The fix for the issue was included into active_merchant gem on Jan 15th, 2015 and is available in activemerchant versions 1.47.0 or higher.
So to fix the issue on your rails app, update the activemerchant gem version. The steps would be as follows:
Modify Gemfile and set the active_merchant gem version with gem 'activemerchant', '1.50.0'
Run bundle install
Any version of activemerchant gem higher than 1.47.0 can be used.
Update
The active_merchant-payu gem doesn't depend on any specific version of activemerchant. Run bundle update to force it to use the latest version of activemerchant gem.

sorcery occured error on rails4 on using mongoid gem

I wanna use sorcery gem using user authentication and mongid gem
add Gemfile to
gem 'sorcery'
$ bundle
$ rails g sorcery:install core reset_password
I was success using activerecord...
but mongoid not make defualt sorcery initial files..
why not make initial files
help expert persons :(
This is deprecated, in future versions you may need to `bundle binstub rails` to work around a system/bundle conflict.
/Users/user_name/.rvm/gems/ruby-2.1.0/gems/activesupport-4.1.0/lib/active_support/concern.rb:126:in `included': Cannot define multiple 'included' blocks for a Concern (ActiveSupport::Concern::MultipleIncludedBlocks)
from /Users/user_name/.rvm/gems/ruby-2.1.0/gems/sorcery-0.8.5/lib/sorcery.rb:73:in `block in <module:Sorcery>'
from /Users/user_name/.rvm/gems/ruby-2.1.0/gems/sorcery-0.8.5/lib/sorcery.rb:72:in `module_eval'
from /Users/user_name/.rvm/gems/ruby-2.1.0/gems/sorcery-0.8.5/lib/sorcery.rb:72:in `<module:Sorcery>'
from /Users/user_name/.rvm/gems/ruby-2.1.0/gems/sorcery-0.8.5/lib/sorcery.rb:1:in `<top (required)>'
from /Users/user_name/.rvm/gems/ruby-2.1.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `require'
from /Users/user_name/.rvm/gems/ruby-2.1.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /Users/user_name/.rvm/gems/ruby-2.1.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `each'
from /Users/user_name/.rvm/gems/ruby-2.1.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `block in require'
from /Users/user_name/.rvm/gems/ruby-2.1.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `each'
from /Users/user_name/.rvm/gems/ruby-2.1.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `require'
from /Users/user_name/.rvm/gems/ruby-2.1.0/gems/bundler-1.6.2/lib/bundler.rb:132:in `require'
from /Users/user_name/Desktop/rails/project/config/application.rb:14:in `<top (required)>'
from /Users/user_name/.rvm/gems/ruby-2.1.0/gems/spring-1.1.3/lib/spring/application.rb:82:in `require'
from /Users/user_name/.rvm/gems/ruby-2.1.0/gems/spring-1.1.3/lib/spring/application.rb:82:in `preload'
from /Users/user_name/.rvm/gems/ruby-2.1.0/gems/spring-1.1.3/lib/spring/application.rb:140:in `serve'
from /Users/user_name/.rvm/gems/ruby-2.1.0/gems/spring-1.1.3/lib/spring/application.rb:128:in `block in run'
from /Users/user_name/.rvm/gems/ruby-2.1.0/gems/spring-1.1.3/lib/spring/application.rb:122:in `loop'
from /Users/user_name/.rvm/gems/ruby-2.1.0/gems/spring-1.1.3/lib/spring/application.rb:122:in `run'
from /Users/user_name/.rvm/gems/ruby-2.1.0/gems/spring-1.1.3/lib/spring/application/boot.rb:18:in `<top (required)>'
from /Users/user_name/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/user_name/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'

Tests are running on my Ubuntu pc, but not on my Mac OS X Lion 10.7.3, Ruby 1.9.3, Rails 3.2.1

I have project in Dropbox and two running laptops: one with Ubuntu and one with Mac OS X Lion 10.7.3. When I try to run either rspec or cucumber on ubuntu they are running well, but when I try to run tests on Mac I have the same errors in
config/application.rb:13: Bundler.require(*Rails.groups(:assets => %w(development test)))
For cucumber:
Using the default profile...
undefined method `gsub' for nil:NilClass (NoMethodError)
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#global/gems/bundler-1.1.1/lib/bundler/runtime.rb:77:in `rescue in rescue in block in require'
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#global/gems/bundler-1.1.1/lib/bundler/runtime.rb:72:in `rescue in block in require'
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#global/gems/bundler-1.1.1/lib/bundler/runtime.rb:62:in `block in require'
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#global/gems/bundler-1.1.1/lib/bundler/runtime.rb:55:in `each'
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#global/gems/bundler-1.1.1/lib/bundler/runtime.rb:55:in `require'
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#global/gems/bundler-1.1.1/lib/bundler.rb:119:in `require'
/Users/sergey/Dropbox/rails_projects/payforapps/config/application.rb:13:in `<top (required)>'
/Users/sergey/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/sergey/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/sergey/Dropbox/rails_projects/payforapps/config/environment.rb:2:in `<top (required)>'
/Users/sergey/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/sergey/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/sergey/Dropbox/rails_projects/payforapps/features/support/env.rb:11:in `block in <top (required)>'
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/spork-0.9.0/lib/spork.rb:24:in `prefork'
/Users/sergey/Dropbox/rails_projects/payforapps/features/support/env.rb:6:in `<top (required)>'
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/cucumber-1.1.9/lib/cucumber/rb_support/rb_language.rb:129:in `load'
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/cucumber-1.1.9/lib/cucumber/rb_support/rb_language.rb:129:in `load_code_file'
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/cucumber-1.1.9/lib/cucumber/runtime/support_code.rb:171:in `load_file'
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/cucumber-1.1.9/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/cucumber-1.1.9/lib/cucumber/runtime/support_code.rb:82:in `each'
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/cucumber-1.1.9/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/cucumber-1.1.9/lib/cucumber/runtime.rb:175:in `load_step_definitions'
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/cucumber-1.1.9/lib/cucumber/runtime.rb:40:in `run!'
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/cucumber-1.1.9/lib/cucumber/cli/main.rb:43:in `execute!'
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/cucumber-1.1.9/lib/cucumber/cli/main.rb:20:in `execute'
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/cucumber-1.1.9/bin/cucumber:14:in `<top (required)>'
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/bin/cucumber:19:in `load'
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/bin/cucumber:19:in `<main>'
For rspec:
No DRb server is running. Running in local process instead ...
/Users/sergey/.rvm/gems/ruby-1.9.3-p125#global/gems/bundler-1.1.1/lib/bundler/runtime.rb:77:in `rescue in rescue in block in require': undefined method `gsub' for nil:NilClass (NoMethodError)
from /Users/sergey/.rvm/gems/ruby-1.9.3-p125#global/gems/bundler-1.1.1/lib/bundler/runtime.rb:72:in `rescue in block in require'
from /Users/sergey/.rvm/gems/ruby-1.9.3-p125#global/gems/bundler-1.1.1/lib/bundler/runtime.rb:62:in `block in require'
from /Users/sergey/.rvm/gems/ruby-1.9.3-p125#global/gems/bundler-1.1.1/lib/bundler/runtime.rb:55:in `each'
from /Users/sergey/.rvm/gems/ruby-1.9.3-p125#global/gems/bundler-1.1.1/lib/bundler/runtime.rb:55:in `require'
from /Users/sergey/.rvm/gems/ruby-1.9.3-p125#global/gems/bundler-1.1.1/lib/bundler.rb:119:in `require'
from /Users/sergey/Dropbox/rails_projects/payforapps/config/application.rb:13:in `<top (required)>'
from /Users/sergey/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/sergey/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/sergey/Dropbox/rails_projects/payforapps/config/environment.rb:2:in `<top (required)>'
from /Users/sergey/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/sergey/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/sergey/Dropbox/rails_projects/payforapps/spec/spec_helper.rb:10:in `block in <top (required)>'
from /Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/spork-0.9.0/lib/spork.rb:24:in `prefork'
from /Users/sergey/Dropbox/rails_projects/payforapps/spec/spec_helper.rb:4:in `<top (required)>'
from /Users/sergey/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/sergey/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/sergey/Dropbox/rails_projects/payforapps/spec/controllers/static_pages_controller_spec.rb:1:in `<top (required)>'
from /Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in `load'
from /Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in `block in load_spec_files'
from /Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in `map'
from /Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in `load_spec_files'
from /Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:22:in `run'
from /Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:66:in `rescue in run'
from /Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:62:in `run'
from /Users/sergey/.rvm/gems/ruby-1.9.3-p125#payforapps321/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:10:in `block in autorun'
How can I fix it? Any help appreciated. Thank you.
The problem was in two gems in my Gemfile:
gem 'rb-inotify', '0.8.8'
gem 'libnotify', '0.5.9'
These gems are compatible only with Ubuntu as I understand.
UPD:
You should OS-specific gems to groups. Add all OS X specific gems to a darwin group in the Gemfile, and all Linux specific gems to a linux group:
# Gemfile
group :darwin do
gem 'rb-fsevent'
gem 'growl'
end
group :linux do
gem 'rb-inotify'
end
To require the appropriate gems in the right environment, add the following to config/application.rb:
platform = RUBY_PLATFORM.match(/(linux|darwin)/)[0].to_sym
Bundler.require(platform)
See https://github.com/bbatsov/rails-style-guide#bundler for more info about bundler here.
There was a problem with my gem .
update the bundler
Read the error properly, it will tell you which gem is the culprit.
Thing is that not all gems are compatible with OS .

Resources