Is the easiest way to have trinidad dependent on an alternative version of jruby-rack?

The current Trinidad gem is dependent on jruby-rack 1.1.0, in which some errors appear in my development log for each of my assets.

/Users/bijan/.rvm/gems/jruby-1.7.3/gems/rack-1.4.5/lib/rack/utils.rb:399 warning: multiple values for a block parameter (2 for 1)

This is a problem that was apparently resolved in the current jruby-rack (1.2) master branch, and I would like to make trinidad depend on this.

Is there any way to do this from my gemfile? Or another simpler solution than marking the Trinidad gem and specifying a different version of the jruby rack (and wanting it to work, as this may not be the case).

+4
source share
1 answer

TL DR - in fact. You will need to create one or both projects or get help from the jruby-rack team through release. See below for assembly steps.


Current versions of Trinidad ( 1.4.4 and preliminary preview version 1.4.5B1) use jruby-rack with optimistic version control ( >= 1.1.10 and >= 1.1.13 , respectively), so any dependency that satisfies this (say 1.2 .0) would have priority without touching Trinidad.

Unfortunately, because the JAR is packaged, the git: or github: dependency will not work. You need to create a gem yourself . This is not so bad - you just need Maven outside of the working JDK / JRuby setup.

After the jruby-rack is created / released with the changes, it will be able to specify a working version in your Gemfile (provided that it receives version 1.2.0):

 gem 'jruby-rack', '~> 1.2.0' gem 'trinidad' 

Perhaps the jruby-rack team could back up this particular change to service line 1.1.13 and press release 1.1.13.2 if it does not lead to incompatibility. Or they may want to make a prepayment from the master.


I have not tested that everything works correctly for assets, but creating and defining a local version was relatively simple:

 # Assuming mvn is on the path, JRuby is active, and you # have gem install permissions: git clone https://github.com/jruby/jruby-rack.git cd jruby-rack bundle install bundle exec rake clean gem SKIP_SPECS=true gem install --local target/jruby-rack-1.2.0.SNAPSHOT.gem 

After that, you can use the gem 'jruby-rack', '~> 1.2.0.SNAPSHOT' in your Gemfile to satisfy Trinidad and check if your problem is resolved.

+2
source

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


All Articles