-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 when running tests on Macbook Air M1 #5523
Comments
I made these changes to ARG RUBY_VERSION
-FROM ruby:$RUBY_VERSION-slim-bullseye
+FROM ruby:$RUBY_VERSION-bullseye
ARG PG_VERSION
ARG MYSQL_VERSION
@@ -14,6 +14,7 @@ RUN apt-get update -qq \
git \
imagemagick \
libvips \
+ libffi-dev \
libmariadb-dev \
sqlite3 \
libsqlite3-dev \ Can you please confirm so I can send a PR? Or feel free to send the PR yourself. 🙂 |
@kennyadsl yes, I had already tried changing the image to bullseye, because I think the slim-buster image and some others have compatibility problems with the M1 architecture, but I had not added the additional
|
Ah got it. I had other changes in my Dockerfile that didn't add here: ARG RUBY_VERSION
-FROM ruby:$RUBY_VERSION-slim-buster
+FROM ruby:$RUBY_VERSION-bullseye
ARG PG_VERSION
ARG MYSQL_VERSION
@@ -14,6 +14,7 @@ RUN apt-get update -qq \
git \
imagemagick \
libvips \
+ libffi-dev \
libmariadb-dev \
sqlite3 \
libsqlite3-dev \
@@ -22,10 +23,10 @@ RUN apt-get update -qq \
&& rm -rf /var/cache/apt/lists/*
RUN curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
- && echo 'deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main' $PG_VERSION > /etc/apt/sources.list.d/pgdg.list
+ && echo 'deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main' $PG_VERSION > /etc/apt/sources.list.d/pgdg.list
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467b942d3a79bd29 \
- && echo "deb http://repo.mysql.com/apt/debian/ buster mysql-"$MYSQL_VERSION > /etc/apt/sources.list.d/mysql.list
+ && echo "deb http://repo.mysql.com/apt/debian/ bullseye mysql-"$MYSQL_VERSION > /etc/apt/sources.list.d/mysql.list
RUN curl -sSL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash -
@@ -49,6 +50,7 @@ RUN useradd -ms /bin/bash $APP_USER
RUN gem update --system \
&& gem install bundler:$BUNDLER_VERSION \
+ && bundle config set force_ruby_platform true \
&& chown -R $APP_USER:$(id -g $APP_USER) /home/$APP_USER/gems
USER $APP_USER |
@kennyadsl Now it's working, but I have some additional errors when running the tests. Command sequence: Logs:
|
Hey folks, I believe #5735 addresses most of what is discussed here. Let me know what you think. |
Awesome @nvandoorn, looks good. When the branch merge is done I will try these new updates |
Hey @FranciscoJBrito the relevant changes have been merged! Are you able to test this again? Please note that you may need to be more specific with the Rails verison to get this working. Specifically, I ran into an issue where our specs use the spelling from Rails 7.1 (https://github.com/rails/rails/blob/d39db5d1891f7509cde2efc425c9d69bbb77e670/railties/lib/rails/generators/testing/behavior.rb), but the specs running in the Docker container still default to something older. Ideally this should be addressed upstream, but in the meantime I think you can sidestep this issue by settings a
|
Hey @nvandoorn, I pull the new changes, then I built the image but when I try to upload the container I get this error: app-1 | --- TEMPLATE END ----------------------------------------------------------------
app-1 |
app-1 | Unfortunately, an unexpected error occurred, and Bundler cannot continue.
app-1 |
app-1 | First, try this link to see if there are any existing issue reports for this error:
app-1 | https://github.com/rubygems/rubygems/search?q=%2Fhome%2Fsolidus_user%2Fgems%2Fgems%2Fstringio-3.1.0%2Flib%2Fstringio.so++cannot+open+shared+object+file++No+such+file+or+directory+-+%2Fhome%2Fsolidus_user%2Fgems%2Fgems%2Fstringio-3.1.0%2Flib%2Fstringio.so&type=Issues
app-1 |
app-1 | If there aren't any reports for this error yet, please fill in the new issue form located at https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md, and copy and paste the report template above in there.
app-1 | |
Hey @FranciscoJBrito thanks for trying this again. Would you be able to clone another copy of the Solidus repo in another folder, delete the existing containers in Docker, and then try again some scratch? I believe we may be experience some "artifacts" from the old setup. Hope you are well. |
@nvandoorn, of course, I'll clone the repository again and delete the Docker cache, then I'll try again and let you know how it goes. |
Hey @nvandoorn sorry for the delay, the tests keep failing, I share with you two videos in which I record the process. In the first video I built the image and set up the containers, when running the tests they failed with the error In the second video, the gems were already installed and the containers were ready, but when I run the tests I get the errors. |
Hey @FranciscoJBrito sorry for the delayed reply. I must have missed the notification for the reply. I noticed there is a small error in my previous comment: I provided RAILS_ENV instead of RAILS_VERSION. Could you try it like this?
|
When trying to run the tests I get an error with the Nokogori gem.
The only previous command I ran was:
docker-compose up -d
and wait for all the gems to be installed. Then when running the commanddocker-compose exec app bin/rspec
I got the error.Solidus Version:
4.3.0
##LOGS:
The text was updated successfully, but these errors were encountered: