thrivesmart / bootscaf

Easily turn your rails generated scaffolds into fully bootstrappified views.
https://medium.com/@thrivesmart/bootscaf-easily-sexify-your-rails-scaffolds-to-use-bootstrap-d30c09d8649d
MIT License
22 stars 6 forks source link

Not generating code correctly? bootscaf (0.1.7) #1

Closed nghamilton closed 8 years ago

nghamilton commented 9 years ago

Hello there - your Gem looks awesome, perfect for something I just whipped up using scaffolds. I am not sure if it is something unique to my setup, or if I have done something stupid, or if this is a bug.. but the generated content repeats for about 400+ lines in the views, and doesn't look like the generated code is valid. Something could be horribly wrong in my setup as I get:

uninitialized constant Bootscaf::VERSION when I run 'bootscaf version'.

Any ideas?

Thanks!

(Below is the generated code)

<% unless @s.any? %>

No s created yet.

<% end %> <% @s.each do || %>

<% unless @s.any? %> No s created yet. <% end %> <% @s.each do || %> <% unless @s.any? %> No s created yet. <% end %> <% @s.each do || %> <% unless @s.any? %> No s created yet. <% end %>
moorage commented 9 years ago

How did you run it? E.g. bootscaf update foobars ?

nghamilton commented 9 years ago

bootscaf update foobars and also bootscaf update --all

Both produced the same results.

On Sun, Apr 12, 2015 at 11:15 PM, Matthew Moore notifications@github.com wrote:

How did you run it? E.g. bootscaf update foobars ?

— Reply to this email directly or view it on GitHub https://github.com/thrivesmart/bootscaf/issues/1#issuecomment-92057992.

moorage commented 9 years ago

Hrm, I can't duplicate. What OS are you on? Bootscaf uses sed, so performance may vary across different flavors...

nghamilton commented 9 years ago

I am running Arch linux, sed definitely installed, however, I feel like this could be a systemic issue with the asset pipeline in my environment: I've attempted to create a new bare bones app with just a single scaffold, and this still fails. Do you have an example with just a single scaffold created that I ciould checkout and then test this theory?

moorage commented 9 years ago

Hm, I'm running on Mac, not Linux, which may result in my differences. Are you willing to run a raw sed command from the cli.rb to see what you get? Maybe the one on this line? https://github.com/thrivesmart/bootscaf/blob/master/lib/bootscaf/cli.rb#L63

nghamilton commented 9 years ago

That seemed to work fine:

<!DOCTYPE html>

<%= yield :page_title %>Bootscaf On Thu, Apr 16, 2015 at 11:27 PM, Matthew Moore notifications@github.com wrote: > Hm, I'm running on Mac, not Linux, which may result in my differences. Are > you willing to run a raw sed command from the cli.rb to see what you get? > Maybe the one on this line? > https://github.com/thrivesmart/bootscaf/blob/master/lib/bootscaf/cli.rb#L63 > > — > Reply to this email directly or view it on GitHub > https://github.com/thrivesmart/bootscaf/issues/1#issuecomment-93733717.
moorage commented 8 years ago

Closing because of the age of this issue. Feel free to re-open on a newer version of the gem.