parndt / refinerycms-wymeditor

WYMeditor extension for Refinery CMS

Home Page:http://refinerycms.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installing gem overwrites the railties binstubs

CJYate opened this issue · comments

On installing this gem (v1.0.4) the rails and rake files in .rvm/gems/ruby-x.y.z/bin are modified, to load the binstubs from wymeditor instead of those in the railties gem.

rvm/gems/ruby-2.1.5/bin/rails before:

#!/usr/bin/env ruby_executable_hooks
#
# This file was generated by RubyGems.
#
# The application 'railties' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'

version = ">= 0"

if ARGV.first
  str = ARGV.first
  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
    version = $1
    ARGV.shift
  end
end

gem 'railties', version
load Gem.bin_path('railties', 'rails', version)

after:

#!/usr/bin/env ruby_executable_hooks
#
# This file was generated by RubyGems.
#
# The application 'refinerycms-wymeditor' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'

version = ">= 0"

if ARGV.first
  str = ARGV.first
  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
    version = $1
    ARGV.shift
  end
end

gem 'refinerycms-wymeditor', version
load Gem.bin_path('refinerycms-wymeditor', 'rails', version)

(see also refinery/refinerycms#2854)

Believed fixed by the pull request #23.