Skip to content

Instantly share code, notes, and snippets.

@jbbarth
Last active December 27, 2015 01:49

Revisions

  1. jbbarth revised this gist Nov 2, 2013. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion commands.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    cd /path/to/your/project

    #install libxml2 v2.8.0 instead of 2.9+ and libxslt 1.1.26 instead of 1.1.28
    brew unlink libxml2
    brew unlink libxslt
    @@ -11,8 +12,15 @@ brew switch libxml2 2.8.0
    brew switch libxslt 1.1.26
    brew link libxml2 --force
    brew link libxslt --force

    #FOR REDMINE:

    #now back to redmine dir
    cd -
    gem uninstall -a -I -x nokogiri
    bundle config build.nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.8.0/include/libxml2/ --with-xml2-lib=/usr/local/Cellar/libxml2/2.8.0/lib/ --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28
    bundle install
    bundle install

    #check versions loaded by nokogiri
    rails runner 'puts "nokogiri: #{Nokogiri::LIBXML_VERSION} / #{Nokogiri::LIBXML_PARSER_VERSION}"'
    #should display: "nokogiri: 2.8.0 / 20800"
  2. jbbarth revised this gist Nov 2, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion commands.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    cd /path/to/your/project
    #install libxml2 v2.8.0 instead of 2.9+
    #install libxml2 v2.8.0 instead of 2.9+ and libxslt 1.1.26 instead of 1.1.28
    brew unlink libxml2
    brew unlink libxslt
    cd $(brew --prefix)
  3. jbbarth revised this gist Nov 2, 2013. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions commands.sh
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,16 @@
    cd /path/to/your/project
    #install libxml2 v2.8.0 instead of 2.9+
    brew unlink libxml2
    brew unlink libxslt
    cd $(brew --prefix)
    git checkout $(brew versions libxml2 | grep 2.8.0 | sed -e 's/.*checkout//')
    git checkout $(brew versions libxslt | grep 1.1.26 | sed -e 's/.*checkout//')
    brew install libxml2
    brew install libxslt
    brew switch libxml2 2.8.0
    brew switch libxslt 1.1.26
    brew link libxml2 --force
    brew link libxslt --force
    #now back to redmine dir
    cd -
    gem uninstall -a -I -x nokogiri
  4. jbbarth revised this gist Oct 31, 2013. 1 changed file with 7 additions and 4 deletions.
    11 changes: 7 additions & 4 deletions commands.sh
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,13 @@
    cd /path/to/your/rails/project
    cd /path/to/your/project
    #install libxml2 v2.8.0 instead of 2.9+
    brew unlink libxml2
    cd $(brew --prefix)
    git checkout $(brew versions libxml2 | grep 2.8.0 | sed -e 's/.*checkout//')
    brew unlink libxml2
    brew install libxml2
    brew switch libxml2 2.8.0
    brew link libxml2 --force
    #now back to redmine dir
    cd -
    gem uninstall nokogiri
    bundle config build.nokogiri -- --with-xml2-dir=/usr
    gem uninstall -a -I -x nokogiri
    bundle config build.nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.8.0/include/libxml2/ --with-xml2-lib=/usr/local/Cellar/libxml2/2.8.0/lib/ --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28
    bundle install
  5. jbbarth created this gist Oct 31, 2013.
    10 changes: 10 additions & 0 deletions commands.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    cd /path/to/your/rails/project
    #install libxml2 v2.8.0 instead of 2.9+
    cd $(brew --prefix)
    git checkout $(brew versions libxml2 | grep 2.8.0 | sed -e 's/.*checkout//')
    brew unlink libxml2
    #now back to redmine dir
    cd -
    gem uninstall nokogiri
    bundle config build.nokogiri -- --with-xml2-dir=/usr
    bundle install