Rails faye server not starting

I have a Rails application that I am trying to incorporate into a ruby faye stone.
I installed faye with

 gem install faye 

and added faye.ru to my root rail. folder:

 require 'faye' Faye::WebSocket.load_adapter('thin') faye_server = Faye::RackAdapter.new(:mount => '/faye', :timeout => 45) run faye_server 

When I want to start faye with:

 rackup -s thin -E production config.ru 

I only get:

 `require': cannot load such file -- faye 

How do I solve this problem?

+4
source share
3 answers

You need to include it in your Gemfile :

 gem 'faye' 

Then run bundle install , this will make gem available for your application.

Also consider gem 'faye', require: 'faye' to make the downloaded gem available to your entire application.

+2
source

require 'rubygems' at the top of your faye.ru (before require 'faye' ) will probably allow this.

0
source

In my case, just add bundle exec before the command, and it worked.

bundle exec rackup faye.ru -E production -s thin

0
source

Source: https://habr.com/ru/post/1444791/


All Articles