Closed mackeee-orange closed 6 months ago
@mackeee-orange It seems you are not getting any of the precompiled binaries, but instead compile the extension yourself. Could you provide more details about your environment (OS, architecture, rust version), and if you actually want to compile the extension yourself, or is it just the binary download not working for you?
Here is the list of supported platforms:
@mackeee-orange I just verified that installation from the binary works on a M1 with a clean 3.2.1 Ruby. There must be something that prevents you from downloading the extension binaries. Is it possible that you force the "ruby platform" in your local or global bundle config?
# .bundle/config
BUNDLE_FORCE_RUBY_PLATFORM: "true"
@eliias Thank you for reply.
This is my env info:
.bundle/config BUNDLE_FORCE_RUBY_PLATFORM: "true"
it did not work in my environment.
Currently, I'm use this gem in Docker container (base image ruby:3.2). It seems well at the moment.
I put my dockerfile just in case
# syntax=docker/dockerfile:experimental
FROM ruby:3.2
ENV LANG C.UTF-8
RUN apt-get update -qq && \
apt-get install -y \
cmake \
build-essential \
libpq-dev \
nodejs \
imagemagick \
graphviz \
tree \
zlib1g-dev \
liblzma-dev \
patch \
libgit2-dev \
pkg-config \
libicu-dev \
libcurl4-openssl-dev \
libssl-dev \
tzdata \
postgresql-client
# Rust install
ENV RUST_HOME /usr/local/lib/rust
ENV RUSTUP_HOME ${RUST_HOME}/rustup
ENV CARGO_HOME ${RUST_HOME}/cargo
RUN mkdir /usr/local/lib/rust && \
chmod 0755 $RUST_HOME
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > ${RUST_HOME}/rustup.sh \
&& chmod +x ${RUST_HOME}/rustup.sh \
&& ${RUST_HOME}/rustup.sh -y --default-toolchain nightly --no-modify-path
ENV PATH $PATH:$CARGO_HOME/bin
ENV APP_ROOT /app
WORKDIR ${APP_ROOT}
COPY ./Gemfile ${APP_ROOT}/
COPY ./Gemfile.lock ${APP_ROOT}/
ENV BUNDLER_VERSION 2.5.5
RUN gem update --system \
&& gem install bundler -v $BUNDLER_VERSION \
&& bundle install --jobs 4 --retry 3
COPY . .
EXPOSE 3000
WORKDIR ${APP_ROOT}
CMD ["bundle", "exec", "puma", "-C", "config/puma.rb"]
@eliias So, this my probrem is solved for now. But if you want, I will provide more information, or of course you can close this issue.
.bundle/config BUNDLE_FORCE_RUBY_PLATFORM: "true"
it did not work in my environment.
To clarify, BUNDLE_FORCE_RUBY_PLATFORM: "true"
this would force bundler to compile the extension, instead of downloading. I am curious what triggered the compilation in your env, as your platform is supported, and we actually provide a binary for it. The whole purpose of building these binaries is to avoid issues such as this one :-).
I am going to try to fix the compilation issue though, this isn't working as intended.
@mackeee-orange Could you try the latest release (v0.5.5) in your dev environment and report back here. I think the compilation might have been a dependency issue.
Gemfile: Almost default rails gemfile and use y-rb latest version.
then bundle install