inesita-rb / inesita

Frontend web application framework in Ruby using Opal.
https://inesita.fazibear.me/
MIT License
259 stars 15 forks source link

Bump version of opal-sprockets cause there is and error with Tild tem… #47

Closed georgi26 closed 4 years ago

georgi26 commented 4 years ago

Hello i was trying inesita and there was error with opal-sprockets it was looking for Tilt

     1: from /home/georgi/.rvm/gems/ruby-2.7.0/gems/opal-sprockets-0.0.1/lib/opal/sprockets/processor.rb:4:in `<top (required)>'

/home/georgi/.rvm/gems/ruby-2.7.0/gems/opal-sprockets-0.0.1/lib/opal/sprockets/processor.rb:15:in `': uninitialized constant Opal::Tilt (NameError)

so this is fixing this issue

fazibear commented 4 years ago

There is some magic with opal-sprockets version. As I remember correctly I should not use specific version.

georgi26 commented 4 years ago

It was ~> 0 but then it was defaulting to very old version something like 0.0.1 probably this is a bug in bundler here is the output:

inesita server Warning: the running version of Bundler (2.1.2) is older than the version that created the lockfile (2.1.4). We suggest you to upgrade to the version that created the lockfile by running gem install bundler:2.1.4.
Failed to load WithCLexer, using pure Ruby lexer Traceback (most recent call last): 19: from /home/georgi/.rvm/gems/ruby-2.7.0/bin/ruby_executable_hooks:24:in <main>' 18: from /home/georgi/.rvm/gems/ruby-2.7.0/bin/ruby_executable_hooks:24:ineval' 17: from /home/georgi/.rvm/gems/ruby-2.7.0/bin/inesita:23:in <main>' 16: from /home/georgi/.rvm/gems/ruby-2.7.0/bin/inesita:23:inload' 15: from /home/georgi/.rvm/gems/ruby-2.7.0/gems/inesita-0.9.1/bin/inesita:3:in <top (required)>' 14: from /home/georgi/.rvm/gems/ruby-2.7.0/gems/inesita-0.9.1/bin/inesita:3:inrequire' 13: from /home/georgi/.rvm/gems/ruby-2.7.0/gems/inesita-0.9.1/lib/inesita/cli.rb:5:in <top (required)>' 12: from /home/georgi/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/bundler.rb:174:inrequire' 11: from /home/georgi/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/bundler/runtime.rb:58:in require' 10: from /home/georgi/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/bundler/runtime.rb:58:ineach' 9: from /home/georgi/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/bundler/runtime.rb:69:in block in require' 8: from /home/georgi/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/bundler/runtime.rb:69:ineach' 7: from /home/georgi/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/bundler/runtime.rb:74:in block (2 levels) in require' 6: from /home/georgi/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/bundler/runtime.rb:74:inrequire' 5: from /home/georgi/.rvm/gems/ruby-2.7.0/gems/inesita-0.9.1/lib/inesita.rb:1:in <top (required)>' 4: from /home/georgi/.rvm/gems/ruby-2.7.0/gems/inesita-0.9.1/lib/inesita.rb:1:inrequire' 3: from /home/georgi/.rvm/gems/ruby-2.7.0/gems/opal-sprockets-0.0.1/lib/opal-sprockets.rb:1:in <top (required)>' 2: from /home/georgi/.rvm/gems/ruby-2.7.0/gems/opal-sprockets-0.0.1/lib/opal-sprockets.rb:1:inrequire' 1: from /home/georgi/.rvm/gems/ruby-2.7.0/gems/opal-sprockets-0.0.1/lib/opal/sprockets/processor.rb:4:in <top (required)>' /home/georgi/.rvm/gems/ruby-2.7.0/gems/opal-sprockets-0.0.1/lib/opal/sprockets/processor.rb:15:in': uninitialized constant Opal::Tilt (NameError)

When i bumped version to ~> 0.4.9 it was fine it seems that Opal::Tilt was renamed to something else

I am planing to use Inesita it is a great framework , i am glad that i can contribute something

fazibear commented 4 years ago

I'll double check that. Anyway I'm pretty sure there was a problem with locked opal-sprockets. Will update to newest bundler first.

fazibear commented 4 years ago

OK Got some idea to solve this problem.

The problem is that opal-sprockets don't support sprockets 4.0. So when bundler installs sprockets 4.0 it also chooses early version of opal-sprockets because those versions allows to install with sprockets 4.0. We won't to lock opal-sprockets on version 0.4.9 The best way to solve this problem is to blacklist old versions of opal-sprockets.

I think the best way is to resolve version like this:

 s.add_dependency 'opal-sprockets', '> 0.3'

And please don't bump inesita version with this PR.

fazibear commented 4 years ago

Sorry my mistake, I mean:

 s.add_dependency 'opal-sprockets', '> 0.3'
fazibear commented 4 years ago

Version 0.9.2 released! Thanks :beers: