Does thomas-mcdonald / bootstrap-sass support the use of generators? Getting an error saying cannot find - ruby-on-rails-3

A simple question. Does this version support generators?
I wanted to test out using it and follow along with Ryan Bates screen cast which I uses a different version.
I've been playing with tables today and want to see how this works using the generator with a scaffold generated model and all its components.
Running rails g bootstrap:themed returns
Could not find generator bootstrap:themed
So I tried to reinstall with rails g install:bootstrap
Error similar which lead me to try to find if it supports these commands.
Thanks

It doesn't need generators for asset files, since we hook into the asset pipeline through the use of a Rails Engine - configuration options are available through the use of variables (use this as a reference, Sass variables are actually $x rather than #x and need to be defined before importing bootstrap), Sass' #extend, and Bootstrap's #makeRow and #makeColumn mixins, along with the other Bootstrap mixins.
Themed scaffold would be interesting but generally would be a pain to maintain - view scaffolding tends to get ripped apart pretty quickly anyway. Perhaps a 'sane' application.html.erb layout generator could be useful.
So yeah, we currently have no generators, don't need an asset one, themed scaffold probably not coming soon unless someone is interested enough to do the work on it, potentially a layout generator in the pipeline.

Checkout
https://github.com/decioferreira/bootstrap-generators
Seems to be what you are asking for.
-Rick

Related

When I use VS Code write Vue.js, the code color sometimes get chaos

as shown below:
I don't understand why, the syntax and format is correct, it's extremely confusing.
I review my code carefully but can't figure out
this seems to be a bug with VS Code. This could be because VS Code is not updated, or an extension that is not supported anymore.
first, try ctrl + shift + p and running >Developer: Reload Window this should reload your current environment and the error should be fixed.
If that doesn't work, try a different extension. I currently use Vetur, and Prettier.
And don't forget to make sure your VS Code is up to date. go to the bottom left and click the settings cog, then check for update or updates.
My answer is, "Start from scratch, and record your steps." I'm happy to share my notes on what is presently working: https://github.com/TheAutomaTom/VsCodeSettings-Vue3
My personal machine had been in that spot for some weeks, so I took a step back and dump out your cornucopia of extensions and their dependencies.
Only run pertinent language services. This is a tall order given how much a Vue + Typescript + Tailwind on Vite app covers. I am suspicious of generalized HTML/CSS/JS packs though, because they may not be built to parse Vue SFCs. Every new release of a services intended for other frameworks, like Angular or React, are still possible culprits (and moving targets).
I gave up getting Prettier and ESLint on stable ground. For a non-workplace thing, I feel okay about that. You may be having issues with a global package, if you've been experimenting. I've tossed out a couple branches following different tutorials. I intend to revisit this one since it has some example projects: rvest.vs-code-prettier-eslint
I've noticed the Volar team seems to let oddities squeak out a little more frequently than I remember in Vetur.... but we love them just the way they are. Sometimes I downgrade just to check if I've gone crazy, yet.

Initializer does not execute when models reload on Rails 3.1 development environment

We are currently using Ruby 1.9.3, Rails 3.1 (i know, we're working hard to upgrade all our applications).
We're using a module (let's call it 'OurModule' to add a method (let's call it 'OurAddOnMethod' to a model defined in a gem (let'd call that 'GemModel'). We have that module file living in the 'config/initializers' directory.
That file defines the module, and then calls this to include it in the model:
# Include the extension
GemModel.send(:include, OurModule)
When developing, things work well mostly, but periodically we will get an error that basically says "Undefined method 'OurAddOnMethod' in 'GemModel'". Restarting the server resolves the issue (for a while).
I'm assuming this is happening because the models are reloaded periodically with changes made in the development environment, and it appears that the initializers do not also get reloaded at that time..? It seems like this may not be the best way to set things up; it is quite frustrating to deal with.
Can anyone enlighten me on a better way to achieve this?
I ended up using wrapping the code in the following, and keeping it in initializers:
ActionDispatch::Callbacks.to_prepare do
# configure stuff or initialize
end
I feel really bad, i completely missed this question that seems to completely cover mine (linking to the answer that i used):
https://stackoverflow.com/a/8636163/287516

Rails 3.2.1 - How and when RESTful routes helpers like photos_path, new_photo_path, edit_photo_path are created

I am a beginner in learning Ruby and Rails.
I was going through the following section on Rails 3.2.1 Guide:
http://guides.rubyonrails.org/routing.html#paths-and-urls
which says:
Creating a resourceful route will also expose a number of helpers to the controllers
in your application. In the case of resources :photos:
photos_path returns /photos
new_photo_path returns /photos/new
edit_photo_path(:id) returns /photos/:id/edit (for instance, edit_photo_path(10) returns /photos/10/edit)
photo_path(:id) returns /photos/:id (for instance, photo_path(10) returns /photos/10)
I am curious to know how and when in the lifecycle of a request are these helpers, i.e. new_photo_path, edit_photo_path etc created and where in the source code I can found the code doing the same.
I was navigating through the code in the following file /gems/actionpack-3.2.1/lib/action_dispatch/routing/mapper.rb and I guess the code in this file is creating the above helpers.Please correct me if I am wrong.
Thanks,
Jignesh
Essentially, yes, that is correct. For more information, you should check out the Routing Walkthrough series that Ryan Bates did last September, where he walks through some of the Rails code that controls routing.
If you use the generators (e.g. rails g controller NewController) the helpers are automatically created and places in ./app/helpers with similar nomenclature. If you are doing the controllers by hand then you would need to create your own, e.g. new_helper. By default though all controllers load application_helper.rb.
If you are not going to use a helper method in more than one controller/view it is best to put it in its own helper file. This guide may help explain it more.
Update
The helper methods are written by you based on your needs. The code for the helper generator can be found here

Using RefineryCMS and the Theming Gem

I am in the beginning stages of diving into the world of RefineryCMS and am having an issue with the theming Engine.
I was able to customize the look of the home and blog pages, but for individual pages I create outside of the home and blog engine are not falling under the normal theme I created. I used the override method to copy all of the necessary files to my custom theme, but like I said, the page is using the default /pages/show.html.erb file vs the theme/mytheme/pages/show.html.erb file..
Any ideas on why this would be happening?
The use of the theming engine is not recommended anymore:
USE OF THE REFINERYCMS-THEMING GEM IS NO LONGER RECOMMENDED. Why?
Theming performs some strange code hacks in order to get it to work.
Therefore, it makes it difficult to keep it compatible with other
engines. Also, many people have reported over 15 second load times
with theming, whereas regularly you would get 3 second load times.
Finally, Resolve Digital no longer uses nor supports this method.
https://github.com/resolve/refinerycms-theming

Is there a script that turns a Pharo core image into something more useful, that would include an OmniBrowser?

I cannot use the most recent dev Pharo release because of some strange issues with the compiler built into Pharo. Well. I was wondering if there is a quick way to install all the nifty extras into Pharo that the core image misses, as compared to the dev image.
With all non-core Pharo images come a script which was used to build that image. Just edit that file and drag&drop it on a new core.
You could also tell me what you don't like in the Pharo images so that I can enhance them.
There is also the script I published on the Pharo wiki that I use to build my images:
http://code.google.com/p/pharo/wiki/ImageBuildScripts
Of course it is very specific to my preferences and needs, but you can take it as an example and adapt it to your own needs.
CommandShell works with Pharo 9.10.10. You will hit several errors as you try to load the package due to Pharo lacking MVC, but you can simply proceed past the first bunch and abandon the last one (that tries to actually open a CommandShell in Morphic). At that point, you'll have a class called PipeableOSProcess that can be used very easily to grab output. For example:
(PipeableOSProcess command: 'ls /bin') output
will return the contents of your bin directory as a string.
Ok, OB itself can be easily downloaded using ScriptLoader loadSuperOB.
Damien adds (from comment below):
The problem with that approach is that nobody really maintains it.
Moreover, you miss some configuration steps to enhance the use of OB
(for example, you won't have the OB-based browsers if you ask for the
senders of a message from a workspace)