Note that there are some explanatory texts on larger screens.

plurals
  1. POrake db:migrate error (Function 'inotify_init' not found)
    primarykey
    data
    text
    <p><img src="https://i.stack.imgur.com/PfJXC.png" alt="enter image description here"></p> <p>I just got done setting up my rails environment on my old mac book and ran into this error. I've installed FFI and rb-inotify. I've also ran bundle install again. I've looked at</p> <p><a href="https://github.com/ffi/ffi/issues/66" rel="nofollow noreferrer">https://github.com/ffi/ffi/issues/66</a></p> <p>and</p> <p><a href="https://groups.google.com/forum/?fromgroups=#!topic/ruby-ffi/gj3_k34o80k" rel="nofollow noreferrer">https://groups.google.com/forum/?fromgroups=#!topic/ruby-ffi/gj3_k34o80k</a></p> <p>which both indicate that this is a linux specific API. There is a suggestion on the second of those links that says I should just remove that gem and things that depend on it, but I am hesitant to remove FFI which seems to depend on it.</p> <p>What course of action do you suggest? Any advice on this matter is greatly appreciated.</p> <p>EDIT: I'm running rails 3.2.7 (updating to 3.2.11 tonight).</p> <p>EDIT 2: I found this: <a href="https://stackoverflow.com/questions/4596606/rubygems-how-do-i-add-platform-specific-dependency">Rubygems: How do I add platform-specific dependency?</a>. Is this helpful?</p> <p>EDIT 3: Do you think it might have something to do with rbenv?</p> <p>EDIT 4: I changed my development gem from rb-inotify to rb-fsevent, ran bundle install then did db:migrate. </p> <p><img src="https://i.stack.imgur.com/diVnk.png" alt="enter image description here"></p> <p>And it continues to run the migration.</p> <p>Hmmm... I'm asking my team members that use macs have tried executing rake db:migrate since our Linux developer added rb-inotify to our gem set.</p> <p>This link may be helpful to someone who comes this way: <a href="https://supportbee.com/devblog/2012/07/18/using-platform-dependent-gems-rb-inotify-and-rb-fsevent/" rel="nofollow noreferrer">https://supportbee.com/devblog/2012/07/18/using-platform-dependent-gems-rb-inotify-and-rb-fsevent/</a></p> <p>EDIT 5: I've been looking at the <a href="https://github.com/guard/guard" rel="nofollow noreferrer">guard gem</a>, specifically this part:</p> <p><img src="https://i.stack.imgur.com/kkJxB.png" alt="enter image description here"></p> <p>I added this, and it will perform the rake db:migrate, but I still get a list of errors very similar to: </p> <pre><code>Could not open library 'libgtk-x11-2.0': dlopen(libgtk-x11-2.0, 13): image not found. </code></pre> <p>I think I'm progressing to a full solution!</p> <p>EDIT 7: Look at this stackoverflow question for the remaining errors due to the libnotify gem: <a href="https://stackoverflow.com/questions/9040502/image-not-found-errors-after-upgrade-to-rails-3-1-how-to-fix">Image Not Found Errors after Upgrade to Rails 3.1, how to fix?</a>. It suggests doing this:</p> <pre><code>gem 'libnotify' if /linux/ =~ RUBY_PLATFORM gem 'growl' if /darwin/ =~ RUBY_PLATFORM </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload