rubyonjets / jets

Ruby on Jets
http://rubyonjets.com
MIT License
2.6k stars 181 forks source link

byebug 11.1.3 can't compile with lambda gems #474

Closed ClementKerneur closed 4 years ago

ClementKerneur commented 4 years ago

When I deploy a Jets application :

> bundle exec jets gems:check
Checking projects gems for binary Lambda gems...
Your project requires compiled gems were not available in any of your lambdagems sources.  Unavailable pre-compiled gems:

* byebug-11.1.3

Your current lambdagems sources:

* https://gems2.lambdagems.com

Jets is unable to build a deployment package that will work on AWS Lambda without the required pre-compiled gems. To remedy this, you can:

* Use another gem that does not require compilation.
* Create your own custom layer with the gem: http://rubyonjets.com/docs/extras/custom-lambda-layers/
* You have choosen not to report data to lambdagems so we will not be notified about these missing gems.  You can edit ~/.jets/agree to change this.
* Reporting gems generally allows Lambdagems to build the missing gems within a few minutes.
* You can try redeploying again after a few minutes.
* Non-reported gems may take days or even longer to be built.

Compiled gems usually take some time to figure out how to build as they each depend on different libraries and packages.
More info: http://rubyonjets.com/docs/lambdagems/

But this version of byebug (11.1.3) seems declared in Lambda Gems

> gem list -s https://gems2.lambdagems.com | grep byebug
byebug (11.1.3)

Gemfile

source "https://rubygems.org"

gem "jets", git: "https://github.com/ClementKerneur/jets.git", submodules: true, branch: "master"

# Include jetpacker if you are you are building html pages
gem "webpacker", git: "https://github.com/tongueroo/webpacker.git", branch: "jets"

gem "dynomite"
gem "dynamoid"
gem "rest-client"

# gem 'nokogiri', '1.10.8'

# development and test groups are not bundled as part of the deployment
group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
  gem 'shotgun'
  gem 'rack'
  gem 'puma'
end

group :test do
  gem 'rspec' # rspec test group only or we get the "irb: warn: can't alias context from irb_context warning" when starting jets console
  gem 'launchy'
  gem 'capybara'
end

Temporary solution

I comment this line gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]

My Environment

Software Version
Operating System Debian GNU/Linux 10 (buster)
Jets 2.3.16
Ruby ruby 2.5.7p206 (2019-10-01 revision 67816) [x86_64-linux]

Thanks

iqre8 commented 4 years ago

I specified byebug (11.1.2) in mt Gemfile.lock to await the release of a precompiled byebug v11.1.3

ClementKerneur commented 4 years ago

Nice i solve also this issue when I downgrade to byebug v11.1.2 (temporary)

mayordwells commented 4 years ago

Getting this same issue for byebug and for puma as well, is downgrading the only available and possible option to fix this?

=> Replacing compiled gems with AWS Lambda Linux compiled versions: /tmp/jets/conectar-message-dispatcher/stage/opt Checking projects gems for binary Lambda gems... Your project requires compiled gems were not available in any of your lambdagems sources. Unavailable pre-compiled gems:

Your current lambdagems sources:

Jets is unable to build a deployment package that will work on AWS Lambda without the required pre-compiled gems. To remedy this, you can:

Downgrading puma to v4.3.3 fixed the issue for me, v4.3.4 also didn't work.

dsound-zz commented 4 years ago

Get this too.

dechenyu commented 4 years ago

It helped me. Thank you!