rmosolgo / react-rails-hot-loader

Live-reload React.js components with Ruby on Rails & react-rails
MIT License
88 stars 26 forks source link

Symbol not found: _clock_gettime #12

Closed ugogo closed 8 years ago

ugogo commented 8 years ago

Hey!

Running rails server gives me following error, any suggestion?

dyld: lazy symbol binding failed: Symbol not found: _clock_gettime
  Referenced from: /usr/local/opt/rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/eventmachine-1.2.0.1/rubyeventmachine.bundle (which was built for Mac OS X 10.12)
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _clock_gettime
  Referenced from: /usr/local/opt/rbenv/versions/2.2.5/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/eventmachine-1.2.0.1/rubyeventmachine.bundle (which was built for Mac OS X 10.12)
  Expected in: /usr/lib/libSystem.B.dylib
rmosolgo commented 8 years ago

Here's the end of that "Referenced from"

eventmachine-1.2.0.1/rubyeventmachine.bundle (which was built for Mac OS X 10.12)

Which makes me think it's a missing dependency for EventMachine (this gem uses EventMachine for a websocket server).

Are you on OSX? Here's a similar bug report where a package from homebrew failed with the same error. It's a bit of a hack, but you could try updating your homebrew, then installing the package mentioned there. Maybe that would cause it to install the missing dependency!

ugogo commented 8 years ago

Yey, thanks! [HotLoader] connected 👍

However, is there a way to change the default assets folder ?

does reload JS assets when they change (from /app/assets/javascripts/.{js,coffee})

I tried this

# config/initializers/react_rails_hot_loader.rb
React::Rails::HotLoader::AssetChangeSet.asset_glob = "**/*.{js,rb}*" # I <3 Opal

but still no reload.

Thanks 🙏

rmosolgo commented 8 years ago

You can see here where app/assets/javascripts is provided:

https://github.com/rmosolgo/react-rails-hot-loader/blob/master/lib/hot_loader/asset_change_set.rb#L14

I don't think it's configurable (yet!) but I'm open to a patch if you'd like to improve that :)

ugogo commented 8 years ago

Haha ok, thanks for your help 🙌