GithubHelp home page GithubHelp logo

Comments (9)

seyhunak avatar seyhunak commented on July 24, 2024

Did you update your bundle? (via bundle update), because recently some fixes applied.
And did you have "app/helpers/application_helper.rb" file ? if not create, looks like generator cant inject flash helper.
Please let me know if you're still experiencing this problem

from twitter-bootstrap-rails.

alec-c4 avatar alec-c4 commented on July 24, 2024

I've created new app and for now generator works good, but there are another error ....

$ rails g bootstrap:layout application fixed
Bootstrap helpers installs to application_helper...
insert app/helpers/application_helper.rb
create app/views/layouts/application.html.haml
(erb):67:in block in template': undefined local variable or methodflash' for #Bootstrap::Generators::LayoutGenerator:0x007fc3970cc2b0 (NameError)
from (erb):66:in each' from (erb):66:intemplate'
from /Users/alec/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/erb.rb:838:in eval' from /Users/alec/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/erb.rb:838:inresult'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/file_manipulation.rb:111:in block in template' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/create_file.rb:54:incall'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/create_file.rb:54:in render' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/create_file.rb:63:inblock (2 levels) in invoke!'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/create_file.rb:63:in open' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/create_file.rb:63:inblock in invoke!'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/empty_directory.rb:114:in call' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/empty_directory.rb:114:ininvoke_with_conflict_check'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/create_file.rb:61:in invoke!' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions.rb:95:inaction'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/create_file.rb:26:in create_file' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/file_manipulation.rb:110:intemplate'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/twitter-bootstrap-rails-2.0.1/lib/generators/bootstrap/layout/layout_generator.rb:29:in generate_layout' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/task.rb:22:inrun'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:118:in invoke_task' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:inblock in invoke_all'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:in each' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:inmap'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:in invoke_all' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/group.rb:226:indispatch'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/base.rb:389:in start' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.1/lib/rails/generators.rb:170:ininvoke'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.1/lib/rails/commands/generate.rb:12:in <top (required)>' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:inrequire'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in block in require' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:inload_dependency'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in require' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.1/lib/rails/commands.rb:29:in<top (required)>'
from script/rails:6:in require' from script/rails:6:in

'

from twitter-bootstrap-rails.

michaelmarconi avatar michaelmarconi commented on July 24, 2024

I'm seeing the identical error if I use the haml-rails gem. If I switch to the haml gem, the layout generator ignores HAML entirely and creates a .erb page.

from twitter-bootstrap-rails.

seyhunak avatar seyhunak commented on July 24, 2024

A new pull to fix layout bug, related to this issue has been merged.
#80

Can you bundle latest repo? If everything is ok. I'll publish.

from twitter-bootstrap-rails.

alec-c4 avatar alec-c4 commented on July 24, 2024

guys, still have problem with flash variable

$ rails g bootstrap:layout fixed
Bootstrap helpers installs to application_helper...
insert app/helpers/application_helper.rb
(erb):67:in block in template': undefined local variable or methodflash' for #Bootstrap::Generators::LayoutGenerator:0x007fe1ac88e5d8 (NameError)
from (erb):66:in each' from (erb):66:intemplate'
from /Users/alec/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/erb.rb:838:in eval' from /Users/alec/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/erb.rb:838:inresult'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/file_manipulation.rb:111:in block in template' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/create_file.rb:54:incall'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/create_file.rb:54:in render' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/create_file.rb:47:inidentical?'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/create_file.rb:73:in on_conflict_behavior' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/empty_directory.rb:111:ininvoke_with_conflict_check'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/create_file.rb:61:in invoke!' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions.rb:95:inaction'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/create_file.rb:26:in create_file' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/actions/file_manipulation.rb:110:intemplate'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/bundler/gems/twitter-bootstrap-rails-e4cb8896ac7d/lib/generators/bootstrap/layout/layout_generator.rb:29:in generate_layout' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/task.rb:22:inrun'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:118:in invoke_task' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:inblock in invoke_all'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:in each' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:inmap'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:in invoke_all' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/group.rb:226:indispatch'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/thor-0.14.6/lib/thor/base.rb:389:in start' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.1/lib/rails/generators.rb:170:ininvoke'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.1/lib/rails/commands/generate.rb:12:in <top (required)>' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:inrequire'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in block in require' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:inload_dependency'
from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in require' from /Users/alec/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.1/lib/rails/commands.rb:29:in<top (required)>'
from script/rails:6:in require' from script/rails:6:in

'

from twitter-bootstrap-rails.

seyhunak avatar seyhunak commented on July 24, 2024

Ok, I'll remove flash messages from layout files or make it seperate branch to manage it. Also publish a new version w/o it. I'll update this issue soon.

from twitter-bootstrap-rails.

seyhunak avatar seyhunak commented on July 24, 2024

Flash messages removed (just generates pure layout). Please bundle latest gem (bundle update) from Rubygems.

from twitter-bootstrap-rails.

storytracer avatar storytracer commented on July 24, 2024

Oh snap, I'm too late :D. Well you didn't have to remove flash messages, there was just some erb mixed into the haml layout. I changed it to haml and now it's working fine.

from twitter-bootstrap-rails.

seyhunak avatar seyhunak commented on July 24, 2024

Sorry, I had to remove flash messages. Different layouts than erb (haml, slim) confuses me.
All need to manage, update changes to make compatible to TWB.
But, it would be great if another library for this purpose uses twitter-bootstrap-rails as a dependency

from twitter-bootstrap-rails.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.