I'm trying to test a notification sistem built with faye gem and running on thin. In my local machine I can make it work but when I try to start faye on my EC2 instance at Amazon I get this error message:
Command:
rackup faye.ru -s thin -E production
Output:
/usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in
require': cannot load such file -- faye (LoadError) from /usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in
require' from /srv/www/app/releases/201509121806504/faye.ru:2:inblock in <main>' from /usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in
instance_eval' from /usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:ininitialize' from /srv/www/app/releases/201509121806504/faye.ru:in
new' from /srv/www/app/releases/201509121806504/faye.ru:in<main>' from /usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in
eval' from /usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:innew_from_string' from /usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in
parse_file' from /usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:299:inbuild_app_and_options_from_config' from /usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:208:in
app' from /usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:336:inwrapped_app' from /usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:272:in
start' from /usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:147:instart' from /usr/local/lib/ruby/gems/2.2.0/gems/rack-1.6.4/bin/rackup:4:in
' from /usr/local/bin/rackup:23:inload' from /usr/local/bin/rackup:23:in
'
In my faye.ru file I have a very simple configuration:
require 'faye'
Faye::WebSocket.load_adapter('thin')
faye_server = Faye::RackAdapter.new(:mount => '/faye', :timeout => 45)
run faye_server
And I've included thin and faye gems in my gem file. When I start it in my local environment works well in production evironment so I'm probably missing something in the EC2 set-up or may be a problem with rubygems?
Thanks
Run your command with bundle exec
, i.e. bundle exec rackup faye.ru -s thin -E production
.