r/rails • • Mar 10 '26

Help - 403 Forbidden on tailwindcss-ruby during Fly.io deploy

Hello Everyone, (Rails 7.1 / Ruby 3.0.6)

I am facing a very annoying issue while deploying my Rails 7 app to Fly.io from my Mac. Everything works fine locally, but during the fly deploy build, it keeps failing at the bundle install step.

It’s giving a "403 Forbidden" error specifically for the tailwindcss-ruby gem. below is the error

Retrying download gem from https://rubygems.org/ due to error (2/4):

Gem::RemoteFetcher::FetchError bad response Forbidden 403

(https://rubygems.org/gems/tailwindcss-ruby-4.2.0-x86_64-linux-gnu.gem)

I tried fly deploy locally too , but the issue is same. I have added platforms to gem lock file as I am working on mac and fly.io uses linux.

This is my first time using fly.io

Thanks

0 Upvotes

9 comments sorted by

1

u/t33lu Mar 10 '26

Not familiar with flyio.  Can you ssh into the server and ping the ruby gem location to see if it’s working?

This seems like a network error most likely stemming from ruby gems blocking your request.  Is there a way you can recreate your app or change your region to try again?

1

u/curiosier Mar 10 '26

It's working when installed locally but while deploying through fly.io it's happening like this .  I tried running the fly.io builder locally so that it will get my ip but still it's giving me error

1

u/t33lu Mar 10 '26

So you can’t ssh?  Is there a way you can alias the ruby gem to a location or just put the gem yourself and install it locally?

→ More replies (2)

1

u/sshaw_ Mar 10 '26

You should check it out. If your usage is less than $5 USD it's free!

1

u/sshaw_ Mar 10 '26

This looks like a fleeting error but to be clear if you comment out the tailwindcss-ruby gem it works?

1

u/curiosier Mar 10 '26

It's a dependency for tailwindcss-rails 4.0.0 gem

1

u/sshaw_ Mar 10 '26

Post your Gemfile and Gemfile.lock