Skip to content

Help with gem development #221

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

Closed
muriloime opened this issue Nov 5, 2022 · 4 comments
Closed

Help with gem development #221

muriloime opened this issue Nov 5, 2022 · 4 comments

Comments

@muriloime
Copy link

muriloime commented Nov 5, 2022

Hi there, I forked the repo (I am trying to add a postcss argument to the executable), but was unable to test it locally ( I keep on getting the error message

Tailwindcss::Commands::ExecutableNotFoundException: Cannot find the tailwindcss executable for x86_64-linux in 

If you're using bundler, please make sure you're on the latest bundler version:

when I point my Gemfile either to my local path or to my github repo (

gem 'tailwindcss-rails', '~> 2.0.17' # ok
# gem 'tailwindcss-rails', path: '/home/murilo/code/learn/'  # raises error 
# gem 'tailwindcss-rails', github: 'muriloime/tailwindcss-rails'  # raises error

Could you please give instructions on how to test the gem locally or give some orientation on how to circumvent the error ?

Many thanks

@muriloime
Copy link
Author

Hi there, I managed to test it locally by running rake package, but was still unable to add the gem in my Gemfile by passing a github repo. Is there a way to do that ?

I created a PR which allows postcss parameter passing #222

cheers

@flavorjones
Copy link
Member

Hi, basic instructions are in CONTRIBUTING.md for setting up your environment. You can run tests with bundle exec rake test.

I have no problem loading a local version with gem "tailwindcss-rails", path: "/path/to/tailwindcss-rails". Can you please provide more information on what error you're seeing?

@muriloime
Copy link
Author

Hi @flavorjones . I cannot use the gem locally without running rake package before. That generates the local versions necessary to run it in my linux environment. otherwise I get the "cannot find the executable" error above.

Similar issue happens when trying to point the gem to a github repo (I have no idea how to generate the different versions in github, my guess is there is no way). That said, in order to use the gem with postcss I had to package a version of the gem and deploy it into rubygems 😱

@flavorjones
Copy link
Member

@muriloime Please understand that the underlying mechanism is that the act of packaging the gem downloads the upstream binary executables. Hopefully, once that's understood, it's obvious why you need to run rake package in order to test against a local version, and why a git: option won't work in your Gemfile. Please let me know if I can help explain this better.

What additions would you like to make to the CONTRIBUTING documentation?

@dhh dhh closed this as not planned Won't fix, can't repro, duplicate, stale Dec 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants