Skip to content
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

When trying to do an initial install silently it still fails checking for the theme. #1382

Open
donnoman opened this issue Sep 6, 2024 · 6 comments

Comments

@donnoman
Copy link

donnoman commented Sep 6, 2024

app-1  | bin/rails aborted!
app-1  | NoMethodError: undefined method `theme' for nil (NoMethodError)
app-1  |
app-1  |       return if account.theme.present? && (silent_install? || !no?("Theme '#{account.theme}' is set. Skip? [Yn]"))
app-1  |                        ^^^^^^

on fresh install after

./bin/rails db:create
./bin/rails spina:install --silent

@donnoman
Copy link
Author

is there a difference between using ./bin/rails spina:install --silent vs ./bin/rails g spina:install --silent ?

I think I saw it both ways in the docs. I'm using the latter now, and not having this issue anymore

@Bramjetten
Copy link
Contributor

The —silent flag only works on the generator. rails spina:install is a shortcut using a Rake task.

@donnoman
Copy link
Author

donnoman commented Sep 13, 2024

Thanks that explains what I was observing. Do we close this, or is the right thing to do emit a warning when running rails spina:install --silent without invoking the generator.

@donnoman
Copy link
Author

clearly --silent does have an impact when running without the generator... whats happens here is a suprise, perhaps it should fully work even without the generator, if it otherwise does most of what its supposed to correctly in this context.

@Bramjetten
Copy link
Contributor

The silent generator is definitely broken, that should be fixed! It's not really clear to me why we really need a silent option though. Why would you use it?

@donnoman
Copy link
Author

I'm using it to seed a fully automated docker installation. I'd rather silent just read some environment variables instead of canned values. But if silent went away I suppose I could do the needful with seeds.rb and a db:prepare before calling g spina:install

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

2 participants