Comments (9)
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.
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 method
flash' for #Bootstrap::Generators::LayoutGenerator:0x007fc3970cc2b0 (NameError)
from (erb):66:in each' from (erb):66:in
template'
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:in
result'
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:in
call'
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:in
block (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:in
block 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:in
invoke_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:in
action'
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:in
template'
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:in
run'
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:in
block 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:in
map'
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:in
dispatch'
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:in
invoke'
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:in
require'
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:in
load_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.
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.
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.
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 method
flash' for #Bootstrap::Generators::LayoutGenerator:0x007fe1ac88e5d8 (NameError)
from (erb):66:in each' from (erb):66:in
template'
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:in
result'
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:in
call'
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:in
identical?'
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:in
invoke_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:in
action'
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:in
template'
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:in
run'
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:in
block 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:in
map'
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:in
dispatch'
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:in
invoke'
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:in
require'
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:in
load_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.
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.
Flash messages removed (just generates pure layout). Please bundle latest gem (bundle update) from Rubygems.
from twitter-bootstrap-rails.
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.
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)
- best way i18n way to produce title on scaffold templates
- Bug error_span in template HOT 2
- set navbar collapse breakpoint
- Get 'Could not find commonjs-0.2.7 in any of the sources' Error 'when generate bootstrap:install' HOT 1
- Bootstrap 4 and Rails 5 HOT 4
- Wrong assets paths HOT 1
- jQuery is not defined with Rails 5.1 and Yarn HOT 3
- issue with up-to-date versions of rails HOT 2
- Dependency issues
- No route matches [GET] "/assets/fonts/glyphicons-halflings-regular.woff2"
- Problem with Rails 5.1.4 and apple-touch-icons asset pipeline HOT 7
- The grid system doesn't work; Alerts all look the same (and not like on the bootstrap website)
- How can i figure out version of bootstrap for static implementation?
- Rails 6.0 support? HOT 1
- BadgeLabelHelper autoload Deprecation Warning HOT 2
- Cut new release HOT 1
- Problem with DEPRECATED warnings for Rails 4 HOT 3
- missing release tags > 2.2.7
- Support for newer version of bootstrap
- Breaking changes from v4 to v5 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twitter-bootstrap-rails.