Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error While building Dockerfile, sprockets requires Ruby version >= 2.5.0. #113

Closed
saikatharryc opened this issue Oct 28, 2019 · 14 comments
Closed
Labels

Comments

@saikatharryc
Copy link

While building Dockerfile it fails saying :

 ERROR:  Error installing rails:
   sprockets requires Ruby version >= 2.5.0.

coming from Dockerfile#L18.
and I guess we can change it in Dockerfile#L14 and add new version which is equal or above 2.5.0 in here

@lethehaiau
Copy link

lethehaiau commented Oct 31, 2019

When following the dev setup, running ./script/run-server return error:
'bin_path': can't find gem bundler (>= 0.a) (Gem::GemNotFoundException)
I try to reinstall rails and get sem error as @saikatharryc

@lethehaiau
Copy link

It works now with judge0/api:1.4.0 not lastest : d

@saikatharryc
Copy link
Author

@lethehaiau are you able to run the production one?

@lethehaiau
Copy link

@saikatharryc the development, I docker pull judge0/api:1.4.0 and update Dockerfile.dev from judge0/api to judge0/api:1.4.0 too. It works now

@hermanzdosilovic
Copy link
Member

You can build production build with ./scripts/prod-build that includes --cache-from flag that solves this problem.

Let me know if this helped you.

@noisytoken
Copy link

noisytoken commented Nov 3, 2019

@hermanzdosilovic I tried executing ./scripts/prod-build in production today and got this error.

Successfully installed rack-test-0.6.3
Successfully installed actionpack-5.0.0
Successfully installed bundler-1.15.4
Building native extensions.  This could take a while...
Successfully installed pg-0.18.0
2 gems installed
The command '/bin/sh -c echo "gem: --no-document" > /root/.gemrc &&     gem install       rails:5.0.0       bundler:1.15.4       pg:0.18 &&     npm install -g [email protected]' returned a non-zero code: 1

@hermanzdosilovic
Copy link
Member

On what branch did you run this?

@noisytoken
Copy link

I am on master. But I also tried it on 1.3.1

@hermanzdosilovic
Copy link
Member

Please do the following:

docker pull judge0/api:1.4.0
docker build -t judge0/api --cache-from judge0/api:1.4.0 . # Or ./scripts/prod-build from master branch.

@noisytoken
Copy link

when I run the second command on Ubuntu 18.04. I get this error:

Fetching ffi 1.11.1
Installing ffi 1.11.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /opt/.gem/gems/ffi-1.11.1/ext/ffi_c
/usr/local/ruby-2.3.3/bin/ruby -r ./siteconf20191106-6-1ckb066.rb extconf.rb
Cannot allocate memory - /usr/local/ruby-2.3.3/bin/ruby -r
./siteconf20191106-6-1ckb066.rb extconf.rb 2>&1

Gem files will remain installed in /opt/.gem/gems/ffi-1.11.1 for inspection.
Results logged to
/opt/.gem/extensions/x86_64-linux/2.3.0-static/ffi-1.11.1/gem_make.out

An error occurred while installing ffi (1.11.1), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.11.1' --source 'https://rubygems.org/'`
succeeds before bundling.

In Gemfile:
  listen was resolved to 3.1.5, which depends on
    rb-inotify was resolved to 0.10.0, which depends on
      ffi
The command '/bin/sh -c RAILS_ENV=production bundle' returned a non-zero code: 5

@noisytoken
Copy link

Please do the following:

docker pull judge0/api:1.4.0
docker build -t judge0/api --cache-from judge0/api:1.4.0 . # Or ./scripts/prod-build from master branch.

Any update?

@hermanzdosilovic
Copy link
Member

I cannot reproduce this. On clean master branch with the above commands I can build Judge0 API. But it seems to me that you have another problem that is not related to Judge0 API.

Cannot allocate memory - /usr/local/ruby-2.3.3/bin/ruby -r

I am not really sure how to "fix" this or how to help you with this. Can you try building it on some other machine?

@saikatharryc
Copy link
Author

@hermanzdosilovic I'm able to build by making this from 5.0.0 to 3.2.12, so far it's running fine though.

@hermanzdosilovic
Copy link
Member

This problem is now resolved with Judge0 API v1.5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants