Deploying vanilla Rails app

I’ve been trying to deploy an existing Rails app to Render but was running into a problem. So I tried to the deploy the sample Rails app. However, that is suffering from the mimemagic gem fiasco (What's up with mimemagic breaking everything? - DEV Community) so I forked the repo and updated Rails to the latest version - GitHub - johnbeynon/rails-6

I thought this would deploy cleanly however the deployment kept getting stuck - I removed some of the calls in the bin/ file so I just had bundle install. The bundle install completes cleanly but now trying to start puma I get:

==> Uploading build...
Apr 9 03:40:30 PM  ==> Build successful 🎉
Apr 9 03:40:30 PM  ==> Deploying...
Apr 9 03:41:02 PM  ==> Starting service with 'bundle exec puma -C config/puma.rb'
Apr 9 03:41:03 PM  bundler: failed to load command: puma (/opt/render/project/.gems/bin/puma)
Apr 9 03:41:03 PM  /opt/render/project/rubies/ruby-2.7.1/lib/ruby/site_ruby/2.7.0/bundler/spec_set.rb:89:in `block in materialize': Could not find nokogiri-1.11.3 in any of the sources (Bundler::GemNotFound)

From the bundle install output you can see that nokogiri 1.11.3 is present:

Apr 9 03:40:03 PM  Using nokogiri 1.11.3 (x86_64-linux)

My original failing build was related to this version of Nokogiri too so I imagine if i can crack this then I’ll be sorted.

Any ideas?


Thanks for the detailed report @John_Beynon. We’ll investigate the nokogiri issue and update our sample Rails app once we get it resolved. I’ll keep you posted here!

1 Like

I’ve made some progress. Locking to Nokogiri 1.8.5 I was able to deploy the sample app successfully along with Nokogiri 1.10.10 (as per your original sample app).

As of 1.11.0 Nokogiri made some fundamental changes shipping with precompiled native gems (Installing Nokogiri - Nokogiri) which I suspect are the cause here.

Also, I’ve noted via shell I’m able to install the 1.11.3 version:

render@srv-c1o69brs1ghftvoc9uvg-5d5cf8c68b-hw24t:~/project/src$ gem install nokogiri
Fetching nokogiri-1.11.3-x86_64-linux.gem
Successfully installed nokogiri-1.11.3-x86_64-linux
Parsing documentation for nokogiri-1.11.3-x86_64-linux
Installing ri documentation for nokogiri-1.11.3-x86_64-linux
Done installing documentation for nokogiri after 4 seconds
1 gem installed

but with “1.11.3” in the gemfile the bundle succeeds but that rake tasks fail with the errors in my original post.

That does sound like progress! Thanks for the update, and for your persistence in debugging this. I’m working with my colleague @dan to figure out how to best update our example repo. If you have thoughts, we’d love to hear them!

Bazinga! - I’ve submitted a PR for the sample app Bump Rails -> by johnbeynon · Pull Request #5 · render-examples/rails-6 · GitHub

The key was bundle lock --add-platform x86_64-linux to ensure that the bundle has the Linux version of Nokogiri available

1 Like

Thanks for investigating, and extra thanks for the PR!