railsapps / rails-bootstrap Goto Github PK
View Code? Open in Web Editor NEWRails 5.1 starter app with the Bootstrap 4 front-end framework.
Rails 5.1 starter app with the Bootstrap 4 front-end framework.
I just created a project using:
rails new myapp -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb
But different from MAC, it didn't give me the options to choose rails-bootstrap.
Can anyone help, me?
The file .ruby-version specifies Ruby version 2.2.2, but the Gemfile specifies 2.2.3. Thus when I 'cd' into the directory and try 'bundle install', I get the error 'Your Ruby version is 2.2.2, but your Gemfile specified 2.2.3'.
as: :select can be replaced with as: :radio_buttons or as: :check_boxes. You can use radio buttons if you prefer.
curious if anyone tried to switch to radio buttons as suggested. found when I did that the formatting/styling did not work.
Overall curious as to how easy it is to work with bootstrap to both add more features and customize. any other tutorials suggested.
thanks all
When generating a new app with this template, I got many problems with JavaScript and styling because of these precompiled assets. It took me a while to find out that these assets exists at all.
I think it would be fine to remove these assets when composing a new app.
When using Bootstrap with Rails 4.1.0, when visiting any page of the rails-bootstrap example app, I get this error:
Sprockets::Rails::Helper::DependencyError at /
Asset depends on 'bootstrap/glyphicons-halflings-regular.eot' to generate properly but has not declared the dependency
Please add: `//= depend_on_asset "bootstrap/glyphicons-halflings-regular.eot"` to '/Users/danielkehoe/workspace/wip/rails-devise-pundit/app/assets/stylesheets/framework_and_overrides.css.scss'
This is because sanity checks from the sprockets_better_errors gem have been merged into Rails 4.1. The intent is to reveal asset pipeline errors that you would see in production when you run the app in development mode. See rails/sprockets-rails#96
To resolve this, the rails_layout gem should update the framework_and_overrides.css.scss file to include:
//= depend_on_asset "bootstrap/glyphicons-halflings-regular.eot"
Attempted to build the 'rails-bootstrap' example application with Rails Composer (built using rails_apps_composer 3.1.30) with Ruby 2.5.0 and Rails 5.2.0.rc1. Got the error:
init recipe stage three
insert config/secrets.yml
Error: The file /Users/danielkehoe/workspace/wip/rails-bootstrap/config/secrets.yml
does not appear to exist
Thanks for this project, I love how easy it was to deploy.
One of my concerns with bootstrap-saas is how inflexible it is. Yes, we can override styles in the bootstrap_and_overrides.css.scss file. The issue is that this file could become very messy if the project were being scaled and required a lot of customizations. A necessary evil? Perhaps...
My suggestion would be to offer a pre-built-in setup option to import styles from http://bootswatch.com/
This is just a thought for a future version, or if someone wants to fork it.
I'm in the final of the Chapter Survey Form and I have this message:
NameError at /
undefined local variable or method `has_no_tab' for Visitor(Table doesn't exist):Class
method_missingactiverecord (4.1.0.rc1) lib/active_record/dynamic_matchers.rb
if match && match.valid?
match.define
send(name, *arguments, &block)
else
super
end
end
class Method
@matchers = []
Tip: add gem "binding_of_caller" to your Gemfile to enable the REPL and local/instance variable inspection.
Request info
Request parameters
{"controller"=>"visitors", "action"=>"new"}
Rack session
I don't know why don't works in my gem file I have the: gem 'activerecord-tableless', in the notice tip shows add a gem "bindbing_of-caller". Do this?
My Gemfile is:
source 'https://rubygems.org'
ruby '2.1.1'
gem 'rails', '4.1.0.rc1'
gem 'sqlite3'
gem 'sass-rails', '> 4.0.1'> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '> 2.0'> 0.4.0', group: :doc
gem 'sdoc', '
gem 'spring', group: :development
gem 'activerecord-tableless'
gem 'bootstrap-sass'
gem 'google_drive'
gem 'high_voltage'
gem 'simple_form'
group :development do
gem 'better_errors'
gem 'binding_of_caller', :platforms=>[:mri_19, :mri_20, :rbx]
gem 'quiet_assets'
gem 'rails_layout'
end
This isn't really an issue for the repo, but the tutorial said to report all issues here.
The gemfile for the tutorial currently lists -
gem 'bootstrap-sass'
which install bootsrap 3.0 and breaks the design / seems to stop the simple_form from working.
It looks like gem 'bootstrap-sass', '~> 2.3.2.2' was recently added to the repo, and just needs to be added to the tutorial.
Thanks.
Sorry, I think I post it in a wrong place.
I closed it already.
Hello,
I am new into programming.
2 hours ago, I could operate the website offline (via localhost) but after folowing a tutorial for deploying the site with heroku, now I cannot run bundle install and the site that I see online is not my website that I have finished.lol.
it shows this error
I used ruby 2.2.3 and the gemfile also show the same version.
I think I messed my website's files, didn't I?!
could someone help me?
also I would like to ask whether I can use this tutorial to deploy my finished website using heroku?
In which step can I "upload" my apps' files?
https://devcenter.heroku.com/articles/getting-started-with-rails4#local-workstation-setup
If I cannot use that tutorial, would somebody be so kind to give me links for the tutorial I need?
The rails-bootstrap example application currently uses Bootstrap 2.3. I'd like to update from Bootstrap 2.3 to Bootstrap 3.0. The accompanying tutorial shows how to use the SimpleForm gem with Rails. SimpleForm integrates nicely with Bootstrap 2.3 for attractive form styling. Unfortunately, SimpleForm does not yet support Bootstrap 3.0. Until SimpleForm issue heartcombo/simple_form#864 is resolved, we must continue to use Bootstrap 2.3.
I am currently following along the "rails-mailinglist-activejob" tutorial which makes use of the rails-bootstrap installation. I noted within the tutorial that we should expect the following prompt but this prompt never occurred within the composer tool:
"Use or create a project-specific rvm gemset? yes"
Note that this did not cause an issue but was not present and went immediately into gem installation after I selected "No" for "Create a GitHub repository?"
When using the rails generator I'm getting a 406 Not Acceptable error on open-uri.rb:
rails new test_app -m https://raw.github.com/RailsApps/rails-composer/master/composer
apply https://raw.github.com/RailsApps/rails-composer/master/composer
/Users/rwilliams/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/open-uri.rb:353:in open_http': 406 Not Acceptable (OpenURI::HTTPError) from /Users/rwilliams/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/open-uri.rb:708:in
buffer_open'
from /Users/rwilliams/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/open-uri.rb:210:in block in open_loop' from /Users/rwilliams/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/open-uri.rb:208:in
catch'
from /Users/rwilliams/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/open-uri.rb:208:in open_loop' from /Users/rwilliams/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/open-uri.rb:149:in
open_uri'
from /Users/rwilliams/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/open-uri.rb:688:in open' from /Users/rwilliams/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/open-uri.rb:34:in
open'
from /Users/rwilliams/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.18.1/lib/thor/actions.rb:216:in apply' from /Users/rwilliams/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.2/lib/rails/generators/app_base.rb:101:in
apply_rails_template'
from (eval):1:in apply_rails_template' from /Users/rwilliams/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.18.1/lib/thor/command.rb:27:in
run'
from /Users/rwilliams/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.18.1/lib/thor/invocation.rb:120:in invoke_command' from /Users/rwilliams/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.18.1/lib/thor/invocation.rb:127:in
block in invoke_all'
from /Users/rwilliams/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.18.1/lib/thor/invocation.rb:127:in each' from /Users/rwilliams/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.18.1/lib/thor/invocation.rb:127:in
map'
from /Users/rwilliams/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.18.1/lib/thor/invocation.rb:127:in invoke_all' from /Users/rwilliams/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.18.1/lib/thor/group.rb:233:in
dispatch'
from /Users/rwilliams/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.18.1/lib/thor/base.rb:439:in start' from /Users/rwilliams/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.2/lib/rails/commands/application.rb:43:in
<top (required)>'
from /Users/rwilliams/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:64:in require' from /Users/rwilliams/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:64:in
require'
from /Users/rwilliams/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.2/lib/rails/cli.rb:15:in <top (required)>' from /Users/rwilliams/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:64:in
require'
from /Users/rwilliams/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:64:in require' from /Users/rwilliams/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.2/bin/rails:9:in
<top (required)>'
from /Users/rwilliams/.rvm/rubies/ruby-2.0.0-p247/bin/rails:23:in load' from /Users/rwilliams/.rvm/rubies/ruby-2.0.0-p247/bin/rails:23:in
You can see a list of Bootstrap variables. For example, it shows @navbar-inverse-bg
as a LESS variable.
The rails-bootstrap example app has a navigation partial that uses the navbar-inverse
class from Bootstrap. The default background color is black. You can override the default:
// framework_and_overrides.css.scss
$navbar-inverse-bg: gray;
// import the CSS framework
@import "bootstrap";
I expected to be able to remove the navbar-inverse
class from the navigation partial, and have a navbar like this:
<%# navigation styled for Bootstrap 3.0 %>
<nav class="navbar">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<%= link_to 'Home', root_path, class: 'navbar-brand' %>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<%= render 'layouts/navigation_links' %>
</ul>
</div>
</div>
</nav>
and then override the $navbar-default-bg
variable like this:
// framework_and_overrides.css.scss
$navbar-default-bg: gray;
// import the CSS framework
@import "bootstrap";
but it didn't work.
The issue was originally reported here:
RailsApps/rails-composer#146
when I try to view the page after completing the Survey Form exercise, I'm getting an error . . . undefined method
undefined method `type_cast_from_database' for "string":String
Extracted source (around line #47):
<div class="row">
<div class="col-md-4 col-md-offset-4">
<%= f.input :favorite, :collection => Visitor::IMAGE_LABELS,
label: false, as: :select, prompt: 'Select a favorite...' %>
</div>
</div>
I double-checked that I had the visitor.rb, visitors_controller.rb and the routes.rb files exactly as written
Not sure what to try next
I think this is a pretty basic problem but I can't seem to fix it. My images and css are not working on production.
Just says: Failed to load resource
Can you help?
PROBLEM: When the modal window is initially displayed, the user is asked to select a favorite and enter a comment. If the user enters nothing in and clicks the Choose button, an error message appears, as it should. However, at this point, the user cannot dismiss the modal window by clicking the Close button or the X. The modal window stays regardless.
I think this is because of <div id="modal-form" class="modal" style="display: <%= @visitor.errors.any? ? 'block' : 'none';%>">
. At this point the visitor.errors
object still evaluates to true and show the div style is set to as a block instead of none.
I think that the div style should be reset to none when the user clicks the x or the close button and the visitor.errors
object cleared.
When I started the Rails server I saw the following message:
DEPRECATION WARNING: The factory_girl gem is deprecated. Please upgrade to factory_bot. See https://github.com/thoughtbot/factory_bot/blob/v4.9.0/UPGRADE_FROM_FACTORY_GIRL.md for further instructions. (called from <top (required)> at /Users/myusername/Sites/rails-bootstrap-master/config/application.rb:7)
The new gems are factory_bot & factory_bot_rails.
Hi,
I'm using Bootstrap 3.0 and Rails 4.1.0.rc1. I'm able to successfully run the tutorial application locally, but when I try to precompile the assets using RAILS_ENV=production rake assets:precompile I get the following error:
rake aborted!
database configuration does not specify adapter
It looks like thee database.yml file has changed structure (with Rails 4.1.0.rc1?), where the production: variables aren't defined. I tried adding the default variables to the production: and it seemed to allow Rails to precompile. Not sure if this is the correct solution.
thanks,
Adrian
It seems a little, well, misleading to tell the user to view the "Tutorial" that links to a paid site. Just saying....
Hi,
The version of capistrano specified is near 3. When you build a new app, you get this error on deploy:
bundle exec cap production deploy
/Users/sjohnson/.rvm/gems/ruby-2.3.1@appdata_home_page/gems/capistrano-3.0.1/lib/capistrano/i18n.rb:4: warning: key :starting is duplicated and overwritten on line 6
cap aborted!
NoMethodError: undefined method on' for main:Object /Users/sjohnson/.rvm/gems/ruby-2.3.1@appdata_home_page/gems/capistrano-3.0.1/lib/capistrano/tasks/git.rake:12:in
block (2 levels) in <top (required)>'
/Users/sjohnson/.rvm/gems/ruby-2.3.1@appdata_home_page/gems/capistrano-3.0.1/lib/capistrano/dsl.rb:14:in invoke' /Users/sjohnson/.rvm/gems/ruby-2.3.1@appdata_home_page/gems/capistrano-3.0.1/lib/capistrano/tasks/deploy.rake:35:in
block (2 levels) in <top (required)>'
/Users/sjohnson/.rvm/gems/ruby-2.3.1@appdata_home_page/gems/capistrano-3.0.1/lib/capistrano/dsl.rb:14:in invoke' /Users/sjohnson/.rvm/gems/ruby-2.3.1@appdata_home_page/gems/capistrano-3.0.1/lib/capistrano/tasks/deploy.rake:4:in
block (2 levels) in <top (required)>'
/Users/sjohnson/.rvm/gems/ruby-2.3.1@appdata_home_page/gems/capistrano-3.0.1/lib/capistrano/dsl.rb:14:in invoke' /Users/sjohnson/.rvm/gems/ruby-2.3.1@appdata_home_page/gems/capistrano-3.0.1/lib/capistrano/tasks/framework.rake:64:in
block (2 levels) in <top (required)>'
/Users/sjohnson/.rvm/gems/ruby-2.3.1@appdata_home_page/gems/capistrano-3.0.1/lib/capistrano/tasks/framework.rake:63:in each' /Users/sjohnson/.rvm/gems/ruby-2.3.1@appdata_home_page/gems/capistrano-3.0.1/lib/capistrano/tasks/framework.rake:63:in
block in <top (required)>'
/Users/sjohnson/.rvm/gems/ruby-2.3.1@appdata_home_page/gems/capistrano-3.0.1/lib/capistrano/application.rb:12:in run' /Users/sjohnson/.rvm/gems/ruby-2.3.1@appdata_home_page/gems/capistrano-3.0.1/bin/cap:3:in
<top (required)>'
/Users/sjohnson/.rvm/gems/ruby-2.3.1@appdata_home_page/bin/cap:22:in load' /Users/sjohnson/.rvm/gems/ruby-2.3.1@appdata_home_page/bin/cap:22:in
eval' /Users/sjohnson/.rvm/gems/ruby-2.3.1@appdata_home_page/bin/ruby_executable_hooks:15:in
'Doing a bundle update capistrano works but you have to update the Gemfile. Perhaps a more modern version of capistrano should be the default.
Reading other issues about SF and Bootstrap 3, I wonder if currently there are any issues selecting Foundation 4 and Simple Forms on app creation process?
I've ran this generator a number of times with various options, and it doesn't seem to generate any views. I've left one of the repositories on my page - the 'academicessays' repo. I don't really know why this is happening, but bundler is failing to install 'nio4r' gem at first attempt. Anyone have any ideas?
When using Bootstrap with Rails 4.1.0, when visiting any page of the rails-bootstrap example app, I get this error:
Sprockets::Rails::Helper::DependencyError at /
Asset depends on 'bootstrap/glyphicons-halflings-regular.eot' to generate properly but has not declared the dependency
Please add: `//= depend_on_asset "bootstrap/glyphicons-halflings-regular.eot"` to '/Users/danielkehoe/workspace/wip/rails-devise-pundit/app/assets/stylesheets/framework_and_overrides.css.scss'
This is because sanity checks from the sprockets_better_errors gem have been merged into Rails 4.1. The intent is to reveal asset pipeline errors that you would see in production when you run the app in development mode. See rails/sprockets-rails#96
To resolve this, the rails_layout gem should update the framework_and_overrides.css.scss file to include:
//= depend_on_asset "bootstrap/glyphicons-halflings-regular.eot"
I'm following the rails-bootstrap tutorial that extends this example application.
I put in my gmail credentials but keep getting a 403 bad authentication. I understand this to mean my creds aren't correct but they are. I have not set up drive for this account, is there anything to do from gmails end? Also, do I need to put the credentials in quotes? Do I need to use the full gmail address? Tried a few things but none of it seems to fix the issue.
PS this is for when I'm trying to make my first post/entry about the coolest city.
Thanks
I get the error of the gem sqlite3 no longer compatible with heroku could I get the full code to get this issue resolved because when I take sqlite out nothing looks right
I've made several attempts to get the rails-bootstrap app running.
Yesterday I couldn't get past an "Asset depends on 'bootstrap/glyphicons-halflings-regular.eot'" error. So today I've wiped and started again.
Now I can't get composer.rb to complete, viz:
extras Set a robots.txt file to ban spiders? (y/n) n
extras Create a GitHub repository? (y/n) n
extras Use or create a project-specific rvm gemset? (y/n) y
extras recipe creating project-specific rvm gemset and .rvmrc
extras creating RVM gemset 'guff'
extras switching to gemset 'guff'
WARN: Unresolved specs during Gem::Specification.reset:
builder (~> 3.1)
rake (>= 0.8.7)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
run rvm gemset list from "."
Warning! PATH is not properly set up, '/home/rails-dev/.rvm/gems/ruby-2.1.1@guff/bin' is not available,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-2.1.1@guff'.
gemsets for ruby-2.1.1 (found in /home/rails-dev/.rvm/gems/ruby-2.1.1)
(default)
fart
global
=> guff
create .ruby-version
create .ruby-gemset
extras recipe setting quiet_assets for reduced asset pipeline logging
extras recipe adding better_errors gem
extras Add 'therubyracer' JavaScript runtime (for Linux users without node.js)? (y/n)
heartcombo/simple_form-bootstrap#31
It looks like there is support now.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.