spree_starter
spree_starter copied to clipboard
Nokogiri Error on fresh install
I get an error about nokogiri on a brand new install...
Connection to postgres (172.19.0.3) 5432 port [tcp/postgresql] succeeded! PostgreSQL is up and running! Resolving dependencies.... The Gemfile's dependencies are satisfied rails aborted! LoadError: cannot load such file -- nokogiri /bundle/ruby/3.0.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in
require'
/bundle/ruby/3.0.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in require' /bundle/ruby/3.0.0/gems/loofah-2.19.0/lib/loofah.rb:4:in
require' /bundle/ruby/3.0.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in
require'
/bundle/ruby/3.0.0/gems/rails-html-sanitizer-1.4.3/lib/rails-html-sanitizer.rb:2:in <main>' /bundle/ruby/3.0.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in
require'
/bundle/ruby/3.0.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' /bundle/ruby/3.0.0/gems/actionview-7.0.4/lib/action_view/helpers/sanitize_helper.rb:3:in
require' /bundle/ruby/3.0.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in
require'
/bundle/ruby/3.0.0/gems/actionview-7.0.4/lib/action_view/helpers.rb:8:in <main>' /bundle/ruby/3.0.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in
require'
/bundle/ruby/3.0.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' /bundle/ruby/3.0.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/context.rb:1:in
require' /bundle/ruby/3.0.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in
require'
/bundle/ruby/3.0.0/gems/sprockets-rails-3.4.2/lib/sprockets/railtie.rb:10:in <main>' /bundle/ruby/3.0.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in
require'
/bundle/ruby/3.0.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' /bundle/ruby/3.0.0/gems/sassc-rails-2.1.2/lib/sassc/rails/railtie.rb:4:in
require_relative' /bundle/ruby/3.0.0/gems/sassc-rails-2.1.2/lib/sassc/rails.rb:10:in
require' /bundle/ruby/3.0.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in
require'
/bundle/ruby/3.0.0/gems/sass-rails-6.0.0/lib/sass-rails.rb:1:in <main>' /bundle/ruby/3.0.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in
require'
/bundle/ruby/3.0.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' /app/config/application.rb:7:in
require' /bundle/ruby/3.0.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in
require'
/app/rakefile:4:in <main>' /bundle/ruby/3.0.0/gems/railties-7.0.4/lib/rails/commands/rake/rake_command.rb:20:in
block in perform'
/bundle/ruby/3.0.0/gems/railties-7.0.4/lib/rails/commands/rake/rake_command.rb:18:in perform' /bundle/ruby/3.0.0/gems/railties-7.0.4/lib/rails/command.rb:51:in
invoke'
/bundle/ruby/3.0.0/gems/railties-7.0.4/lib/rails/commands.rb:18:in <main>' /bundle/ruby/3.0.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in
require'
/bundle/ruby/3.0.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require' bin/rails:4:in
Up on this issue. I have the same problem.
Yep, getting this when using the CLI to install the dockerized version
Hi @gekkota @muhwyndhamhp @Deekor could you provide some steps to reproduce this issue? I tried doing a clean setup via CLI, but it doesn't happen for me.
Also, it would be helpful if you could share some more details (OS, CPU architecture etc.)
Hi @rafalcymerys thanks for the response. The step I took to reproduce this issue is exactly the same as the getting started step in spree docs during CLI install:
npx @spree/cli new app
The problem occurs after the docker image for the web and backend was created. I was finally able to fix the issue by downloading the starter project (not via npx cli) and manually modifying Dockerfile.development
to not copy the Gemfile.lock (Just the Gemfile) and delete the Gemfile.lock file from repo.
Seems like a version of nokogiri which doesn't compatible with the docker image were included in the Gemfile.lock file, where I saw these versions of nokogiri included:
nokogiri (1.13.9-arm64-darwin)
racc (~> 1.4)
nokogiri (1.13.9-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.13.9-x86_64-linux)
After I ran bundle install
via docker image shipped with the starter, it changes into followings:
nokogiri (1.14.0-aarch64-linux)
And then it ran normally.
Edit: forgot to mention the system I'm in:
- macOS Ventura 13.1
- Macbook Pro M2
- 8GB of RAM
- Ruby 3.2.0 installed via homebrew
Hi @gekkota @muhwyndhamhp - are you using the Spree 4.5 (dockerized) or Spree 4.5 (hybrid) mode in the CLI?
I'm using 4.5 dockerized version @rafalcymerys
Oh, I just see your comment regarding architecture @muhwyndhamhp - my main dev machine is x86 and that's why I wasn't able to reproduce the issue. Let me think about the best possible solution. I'm wondering whether we need Gemfile.lock in this repo at all - this could probably be generated the moment someone downloads a clean spree_starter and runs bundle install for the first time.
I have tried modify the Dockerfile and it appears that Gemfile.lock file is not necessary @rafalcymerys. It can ran properly and regenerate the proper Gemfile.lock file anyway whenever bundle install ran.