I have some code that is using SyncEnumerator. As you can see here, SyncEnumerator requires generator.rb. To include this, the developer of this plugin has require 'generator'. This worked on my previous Rails installation but is not working since I upgraded OS X and reinstalled Rails. Now when I try to install my gems, I get:
Macintosh:mls TAmoyal$ sudo rake gems:install
(in /Users/TAmoyal/Desktop/RoR_Projects/mls)
rake aborted!
no such file to load -- generator
(See full trace by running task with --trace)
Stack Trace:
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require': no such file to load -- generator (MissingSourceFile)
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `block in require'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
from /Users/TAmoyal/Desktop/RoR_Projects/mls/vendor/plugins/blackbook/lib/blackbook/importer/page_scraper.rb:4:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `block in require'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
from /Users/TAmoyal/Desktop/RoR_Projects/mls/vendor/plugins/blackbook/lib/blackbook/importer/aol.rb:1:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `block in require'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
from /Users/TAmoyal/Desktop/RoR_Projects/mls/vendor/plugins/blackbook/lib/blackbook.rb:68:in `block in <top (required)>'
from /Users/TAmoyal/Desktop/RoR_Projects/mls/vendor/plugins/blackbook/lib/blackbook.rb:68:in `each'
from /Users/TAmoyal/Desktop/RoR_Projects/mls/vendor/plugins/blackbook/lib/blackbook.rb:68:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `block in require'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
from /Users/TAmoyal/Desktop/RoR_Projects/mls/vendor/plugins/blackbook/init.rb:1:in `block in evaluate_init_rb'
from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/rails/plugin.rb:146:in `eval'
from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/rails/plugin.rb:146:in `block in evaluate_init_rb'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/rails/plugin.rb:142:in `evaluate_init_rb'
from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/rails/plugin.rb:48:in `load'
from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/rails/plugin/loader.rb:38:in `block in load_plugins'
from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/rails/plugin/loader.rb:37:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/rails/plugin/loader.rb:37:in `load_plugins'
from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/initializer.rb:348:in `load_plugins'
from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/initializer.rb:163:in `process'
from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/initializer.rb:113:in `run'
from /Users/TAmoyal/Desktop/RoR_Projects/mls/config/environment.rb:13:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `block in require'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/commands/server.rb:84:in `<top (required)>'
from script/server:3:in `require'
from script/server:3:in `<main>'
Anyone know how to solve this?
Thanks!
The problem has nothing to do with Rails. Both SyncEnumerator and Generator are part of the Ruby Core Library. You should have both in Ruby 1.8.x.
Could you post the full exception trace?
EDIT:
In Ruby 1.9 the Generator library has been removed in favor of Fibers.
See here and here.
The library you are using is not compatible with Ruby 1.9. You can try to copy the Generator and SyncEnumerator files from Ruby 1.8.x, but I don't know whether this solution will work.
in 1.9 there's Enumerator::Generator
or you might be able to get away with creating your own file
'generator'
that just does
Generator = Enumerator
GL.
-r
I had this problem with ruby 1.8 and found that my problem was that i was requiring 'generator' and that changing it to require 'generator.rb' fixed it. I believe this was because of a conflict in rails with its own Generator class
SyncEnumerator has moved to rexml/syncenumerator in Ruby 1.9.x you can use it by doing require 'rexml/syncenumerator'
Related
Please help me, i'm a new ruby/rails programmer, and I want to try a free dashboard admin (AdminLTE2), but i got a problem when trying to install it, i can generate it,
im already add "gem 'adminlte2-rails'" to Gemfile, and the gem was successfully deteced in rails generate option.
i have already googling the error code too, but found nothing.
i'm using all newest ruby(2.2.2) technology, gem 2.4.8, rails 4.2.1. Thanks
and sorry for my bad English.
g40#Lenovo-G40:~/Sites/TestSites$ bin/rails generate admin_lte2
insert app/assets/stylesheets/application.scss
/home/g40/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:98:in `binread': No such file or directory # rb_sysopen - /home/g40/Sites/TestSites/app/assets/stylesheets/application.scss (Errno::ENOENT)
from /home/g40/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:98:in `replace!'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:59:in `invoke!'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/actions.rb:94:in `action'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:30:in `insert_into_file'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/adminlte2-rails-0.0.6/lib/generators/admin_lte2/admin_lte2_generator.rb:8:in `main'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/railties-4.2.1/lib/rails/generators.rb:157:in `invoke'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/railties-4.2.1/lib/rails/commands/generate.rb:13:in `<top (required)>'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:123:in `require_command!'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:130:in `generate_or_destroy'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:50:in `generate'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/railties-4.2.1/lib/rails/commands.rb:17:in `<top (required)>'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
from /home/g40/Sites/TestSites/bin/rails:8:in `<top (required)>'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/g40/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
from /home/g40/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/g40/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
Your error output contains the following line:
/home/.../inject_into_file.rb:98:in `binread': No such file or directory # rb_sysopen - /home/g40/Sites/TestSites/app/assets/stylesheets/application.scss (Errno::ENOENT)
You have to create the app/assets/stylesheets/application.scss file manually.
I am trying to convert ?locale=en in routes to /en/ I found routing-filter gem
but if I try to run rails, I get this error:
samir#samir-VirtualBox:~/RubymineProjects/dcaclab$ rails s
/home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require': cannot load such file -- routing_filter/adapters/rails_4 (LoadError)
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `block in require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in `load_dependency'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/routing-filter-0.3.1/lib/routing_filter.rb:27:in `<top (required)>'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `block in require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in `load_dependency'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/routing-filter-0.3.1/lib/routing-filter.rb:1:in `<top (required)>'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `each'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `block in require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `each'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler.rb:131:in `require'
from /home/samir/RubymineProjects/dcaclab/config/application.rb:8:in `<top (required)>'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/railties-4.0.3/lib/rails/commands.rb:74:in `require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/railties-4.0.3/lib/rails/commands.rb:74:in `block in <top (required)>'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/railties-4.0.3/lib/rails/commands.rb:71:in `tap'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/railties-4.0.3/lib/rails/commands.rb:71:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Any idea how to solve this?
The version of the gem you are currently using is probably not compatible with Rails 4. You need to have version 0.4.0.pre, which can be installed through gem install routing-filter --pre or by editing your gemfile. I have found this issue, which relates to your problem: https://github.com/svenfuchs/routing-filter/issues/48
I'm trying to use the carter gem for my rails project. How do I use the gem to generate its pre-made controllers, views, and models? There is no documentation for carter, so my attempt was to try rails g carter and rails g carter:install, both of which returned the following:
/home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require': cannot load such file -- state_machine (LoadError)
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/carter-0.7.2/lib/carter/state_machine.rb:1:in `<top (required)>'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/carter-0.7.2/lib/carter.rb:6:in `<top (required)>'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /home/hermes/coding/rails/seniorshub/config/application.rb:7:in `<top (required)>'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:44:in `require'
from /home/hermes/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:44:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
So two questions: Were my commands the correct ones, and if so, then how do I begin solving the above error (and what is the above error? Dependencies?) ? If my commands were not correct, then what is the correct way of generating M's and V's and C's from a gem, specifically carter?
I know this is getting a bit off course, but you really don't want a gem that hasn't been touched in two years.
Consider the follwing instead:
Spree
ror_ecommerce
Paying for Shopify
I'm working on a Rails app and testing using Rspec. Unfortunately when I try to run bundle exec rspec I'm met with a giant wall of error text (below).
The first line I see is a warning about Nokogiri, but I suspect that is unrelated to the main issue at hand.
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.8
Could not open library 'kernel32': dlopen(kernel32, 5): image not found.
Could not open library 'libkernel32.dylib': dlopen(libkernel32.dylib, 5): image not found (LoadError)
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/library.rb:123:in `block in ffi_lib'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/library.rb:90:in `map'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/library.rb:90:in `ffi_lib'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rb-fchange-0.0.5/lib/rb-fchange/native.rb:10:in `<module:Native>'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rb-fchange-0.0.5/lib/rb-fchange/native.rb:8:in `<module:FChange>'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rb-fchange-0.0.5/lib/rb-fchange/native.rb:3:in `<top (required)>'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rb-fchange-0.0.5/lib/rb-fchange.rb:1:in `<top (required)>'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
/Users/varunrau/Documents/curr/BPSF/config/application.rb:7:in `<top (required)>'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/app_framework/rails.rb:48:in `preload_rails'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/app_framework/rails.rb:7:in `preload'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/test_framework.rb:134:in `block in preload'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork.rb:62:in `exec_prefork'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/test_framework.rb:120:in `preload'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/run_strategy/forking.rb:25:in `preload'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/runner.rb:74:in `run'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/runner.rb:10:in `run'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/bin/spork:10:in `<top (required)>'
/usr/local/Cellar/ruby/1.9.3-p194/bin/spork:23:in `load'
/usr/local/Cellar/ruby/1.9.3-p194/bin/spork:23:in `<main>'
My system details are: OS X 10.8, Rails 3.2.13, Ruby 1.9.3p194. I tried reinstalling Ruby and the rb-fchange gem as per some advice on this site, but nothing has worked.
Thanks so much for the help!
I upgraded from Rails 3.0.11 to 3.1.3. When I start the server, it's giving the error:
>> Using rack adapter
rake aborted!
libffi.so.5: cannot open shared object file: No such file or directory - /home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/ffi-1.0.11/lib/ffi_c.so
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.1.4/lib/active_support/dependencies.rb:240:in `require'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.1.4/lib/active_support/dependencies.rb:240:in `block in require'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.1.4/lib/active_support/dependencies.rb:223:in `block in load_dependency'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.1.4/lib/active_support/dependencies.rb:640:in `new_constants_in'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.1.4/lib/active_support/dependencies.rb:223:in `load_dependency'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.1.4/lib/active_support/dependencies.rb:240:in `require'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/ffi-1.0.11/lib/ffi.rb:11:in `rescue in <top (required)>'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/ffi-1.0.11/lib/ffi.rb:2:in `<top (required)>'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.1.4/lib/active_support/dependencies.rb:240:in `require'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.1.4/lib/active_support/dependencies.rb:240:in `block in require'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.1.4/lib/active_support/dependencies.rb:223:in `block in load_dependency'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.1.4/lib/active_support/dependencies.rb:640:in `new_constants_in'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.1.4/lib/active_support/dependencies.rb:223:in `load_dependency'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.1.4/lib/active_support/dependencies.rb:240:in `require'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/ethon-0.5.3/lib/ethon.rb:2:in `<top (required)>'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.1.4/lib/active_support/dependencies.rb:240:in `require'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.1.4/lib/active_support/dependencies.rb:240:in `block in require'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.1.4/lib/active_support/dependencies.rb:223:in `block in load_dependency'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.1.4/lib/active_support/dependencies.rb:640:in `new_constants_in'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.1.4/lib/active_support/dependencies.rb:223:in `load_dependency'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.1.4/lib/active_support/dependencies.rb:240:in `require'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/typhoeus-0.5.3/lib/typhoeus.rb:2:in `<top (required)>'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:in `require'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:in `each'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:in `block in require'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `each'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `require'
/home/srikanth/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.2.1/lib/bundler.rb:128:in `require'
/home/srikanth/projects/tango/config/application.rb:19:in `<top (required)>'
/home/srikanth/projects/tango/Rakefile:8:in `require'
/home/srikanth/projects/tango/Rakefile:8:in `<top (required)>'
(See full trace by running task with --trace)
Any idea how to fix this?
Maybe the ffi gem was not installed properly?
gem uninstall ffi
Assuming you are using Ubuntu:
sudo apt-get install libffi libffi-dev
gem install ffi -v 1.0.11
As I already have 'ffi' installed. I have to find another solution, try below(Which helped me):
Locate the file "libffi.so.5", if it is not present check for "libffi.so." (in my case it was 6, that is libffi.so.6).
Now unlink the file associated with the "/usr/lib64/libffi.so.6". (In my case it was pointed to "libffi.so.6.0.1")
Now create a new symlink for "libffi.so.5", such that "/usr/lib64/libffi.so.5" should point to the new one, "libffi.so.6.0.1".
ie,the final set up should look like:- "/usr/lib64/libffi.so.5 -> libffi.so.6.0.1"
Hope this helps.(I use Amazon Linux AMI based instances.)
This worked for me.
ln -s /usr/lib64/libffi.so.6 /usr/lib64/libffi.so.5