Generate controller error #235
Answered
by
klippas-rob
klippas-rob
asked this question in
Help
Replies: 4 comments 5 replies
-
Hey @klippas-rob, thanks for opening the issue. Super weird that it’s interfering with the controller generator. I wasn't able to reproduce this locally. Which version of Ruby and Rails are you using? |
Beta Was this translation helpful? Give feedback.
4 replies
-
It may be tomorrow, but will definitely get it to you.
… On Oct 10, 2022, at 15:28, Joel Drapper ***@***.***> wrote:
@klippas-rob <https://github.com/klippas-rob> do you think you could see if you can get this in a fresh Rails app and send me steps you took from rails new to get there?
—
Reply to this email directly, view it on GitHub <#235 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/APOOX5P6XBZZ2FUN5A63WE3WCRU5BANCNFSM6AAAAAAQ7YXE4M>.
You are receiving this because you were mentioned.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi Joel,
I found the problem.
It’s my fault—my apologies for creating this hassle for you.
I had this in the config/application.rb file:
config.generators do |g|
g.template_engine :phlex
end
However, I’m a little puzzled.
When I remove the above code and do “rails generate controller …”, it invokes erb.
Is that expected?
rails generate controller Cards
create app/controllers/cards_controller.rb
invoke erb
…
Cheers,
Rob
… On Oct 10, 2022, at 15:28, Joel Drapper ***@***.***> wrote:
@klippas-rob <https://github.com/klippas-rob> do you think you could see if you can get this in a fresh Rails app and send me steps you took from rails new to get there?
—
Reply to this email directly, view it on GitHub <#235 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/APOOX5P6XBZZ2FUN5A63WE3WCRU5BANCNFSM6AAAAAAQ7YXE4M>.
You are receiving this because you were mentioned.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Thanks Joel—again, apologies for the wild goose chase.
… On Oct 11, 2022, at 11:48, Joel Drapper ***@***.***> wrote:
Ah, that makes sense. Yeah, Phlex is not a Rails template engine. It's a complete replacement for ActionView. I think we could find a way to hook into controller generation to have it generate Phlex views instead of ERB templates.
—
Reply to this email directly, view it on GitHub <#235 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/APOOX5ISYFDHGBYWOJQW2VLWCWD6RANCNFSM6AAAAAAQ7YXE4M>.
You are receiving this because you were mentioned.
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
joeldrapper
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm new to Rails so this is likely my mistake…
rails g controller cards
produces:
Prior to this I installed phlex with:
bin/rails phlex:install
and in my Gemfile I have:
gem "phlex", "~> 0.3.1"
Beta Was this translation helpful? Give feedback.
All reactions