On 8 May 2018 at 15:54, Sam Ruby <[email protected]> wrote: > On Tue, May 8, 2018 at 10:21 AM, sebb <[email protected]> wrote: >> On 8 May 2018 at 15:07, <[email protected]> wrote: >>> This is an automated email from the ASF dual-hosted git repository. >>> >>> rubys pushed a commit to branch master >>> in repository https://gitbox.apache.org/repos/asf/whimsy.git >>> >>> >>> The following commit(s) were added to refs/heads/master by this push: >>> new fa68eb7 chdir so that the right version of whimsy/asf is picked up >>> fa68eb7 is described below >>> >>> commit fa68eb7f9a2f122045432a1072cbff66d43fc04f >>> Author: Sam Ruby <[email protected]> >>> AuthorDate: Tue May 8 10:06:27 2018 -0400 >>> >>> chdir so that the right version of whimsy/asf is picked up >>> --- >>> www/board/agenda/daemon/channel.rb | 4 +--- >>> www/board/agenda/daemon/wss.rb | 1 + >>> 2 files changed, 2 insertions(+), 3 deletions(-) >>> >>> diff --git a/www/board/agenda/daemon/channel.rb >>> b/www/board/agenda/daemon/channel.rb >>> index 49d567b..8441897 100644 >>> --- a/www/board/agenda/daemon/channel.rb >>> +++ b/www/board/agenda/daemon/channel.rb >>> @@ -16,9 +16,7 @@ class Channel >>> @@sockets = Concurrent::Map.new >>> @@users = Concurrent::Map.new {|map,key| map[key]=[]} >>> >>> - # As this tool doesn't load the full whimsy libraries, it can't make use >>> - # of niceties like short names... so specify the full path to repository. >>> - FOUNDATION_BOARD = ASF::SVN['private/foundation/board'] >>> + FOUNDATION_BOARD = ASF::SVN['foundation_board'] >>> >>> # add a new socket/userid pair >>> def self.add(ws, id) >>> diff --git a/www/board/agenda/daemon/wss.rb b/www/board/agenda/daemon/wss.rb >>> index 02ff1d6..716b62e 100755 >>> --- a/www/board/agenda/daemon/wss.rb >>> +++ b/www/board/agenda/daemon/wss.rb >>> @@ -1,4 +1,5 @@ >>> #!/usr/bin/env ruby >>> +Dir.chdir __dir__ >> >> I don't understand why it should matter what the starting directory is. > > Apparently, bundler/setup uses the working directory to find the > Gemfile. Doesn't seem to be well documented. >
AFAICT the nearest Gemfile is in the parent folder. Maybe bundler looks up a level as well. >> Is the same incantation needed elsewhere? > > Should not be needed by any passenger application. Nor any CGI. > Should only be required for standalone applications that explicitly > require bunder/setup. In which case we just need to document such cases. Or maybe ignore bundler/require and require the gems directly? Does the daemon code really need all the gems listed in the Gemfile? If not, local requires should be OK. >> It seems like a fragile fix. > > Suggestions? > > - Sam Ruby > >>> require 'bundler/setup' >>> require 'websocket-eventmachine-server' >>> require 'listen' >>> >>> -- >>> To stop receiving notification emails like this one, please contact >>> [email protected].
