I work in a completely air-gapped environment in which I would love to use Ruby on Rails. I have the ability to cache dependencies for offline use in Nexus. The problem I'm having is that after I've cached all my dependencies for Rails 6 (including the NodeJS ones), node-sass is unable to install because it attempts to download a file from GitHub.
I'm completely fine without using a CSS pre-processor, and would much rather deal with vanilla CSS than deal with this dependency headache. Is it possible to disable just Sass support when creating a new Rails app? I'm able to use --skip-javascript to disable all javascript support, but since all the other dependencies are able to be installed, it would be a shame to have to disable them just because node-sass can't be installed offline. Is there an option like that for Sass?
I'm aware I could manually copy the .node file from the GitHub release page, however, I'm trying to make this process as minimalistic and automatable as possible.
I'm working with Fedora Linux if that's relevant.
Any help is appreciated.
Yes, I think --skip-sprockets option will disable Sass. You can also disable webpacker using --skip-javascript.
You may try below command.
rails new green-forest -S -J
Related
Somebody has developed a custom plug-in for a project of mine.
I now want to change some templates from this plug-in and no matter what changes I make to these templates, nothing changes! I don’t understand why. I’ve cleaned caches several times and the cache tag is not used. It’s my third craft cms project but I’ve never had much experience with custom plug-ins.
What might be happening?
Have you tried composer commands for the same?
composer update
For updating the composer
If it doesn't work try uninstalling the plugin then install it again with the following commands
composer remove vendor/plugin-handle
For uninstalling the Plugin
composer require vendor/plugin-handle
Install the plugin again then activate the same through CP
Hope this helps you in the same.
I am building a React app in Rails and would like to try react-redux. I noticed that it doesn't offer a CDN nor a bower package.
The installation instructions recommend using NPM, but this is not a node project. I handle all my current assets through the Rails asset pipeline, a CDN or a bower package (via rails-assets)
Is there a way to install it without using NPM?
Is there a way to get NPM packages to play nice with existing asset pipeline packages?
You can also check out https://github.com/shakacode/react_on_rails. It's integrated with webpack which gives it a nice and familiar javascript flow.
They've also got a live example at http://www.reactrails.com/ and the code for that at https://github.com/shakacode/react-webpack-rails-tutorial.
I found that it is possible using react-rails in conjunction with browserify-rails. This blog article explains it pretty well.
Just run the command yarn add redux react-redux
This will add redux and react-redux to dependency as well as connect react to redux.
I am using rails 6 and it works fine with this.
add ruby related lib via bundle add and js related lib via yarn
I have a Rails project that is going to be using OpenCV, and it depends on a certain version of it (2.4.6.1).
I'm looking for deployment advice. The Ubuntu opencv package is an earlier version and therefore not suitable.
I can see a number of possibilities, but I'm trying to think of what will work best.
Just write it up in a README and expect people to follow it: download this, apt-get that, etc...
Add opencv, tagged at the version we need, as a git subtree, and include a Rake task to build it.
Write a script to download and compile the needed code.
Something else ?
None of them seem all that great, to tell the truth.
Can your application be made to work with OpenCV 2.4.2? That is available in Ubuntu 13.04, and you could request it be backported to 12.04. If not, you could update the source package to 2.4.6.1 (which would require learning about debian packaging but might not be too difficult since you would be modifying an existing package instead of starting from scratch), upload it to a PPA, and instruct your users on Ubuntu to install OpenCV from there. You could also package your rails application and put it in the PPA, which would make overall installation even easier.
I'm using the AngularJS Yeoman generator (https://github.com/yeoman/generator-angular) and Express for the server. When running grunt server, it starts up my app fine and compiles .scss files into the .tmp folder in the root directory, but my pages don't automatically load that css. I have set up a link to the style/style.css stylesheet in my layout jade file.
I've also tried grunt compass, which works fine, but again, does not make it so my views actually load the css file in .tmp. I have the default compass setup in grunt.
This was an issue with live-reloading that has been addressed in newer releases. Update your generators through yo or by running npm update -g generator-angular. If you want to upgrade an existing project, you can run yo angular in the same directory and choose the diff option to see the changes you have to make.
As for May 22, 2015 ... the yeoman generator-angular does not work correctly unless you select Yes when asked if you'd like to include the Twitter Bootstrap. Perhaps subsequent releases will fix this.
On a good note, there are much less problems with the generator-angular than with generator-angular-ui-router (which is a disaster)
How to update many plugins version when old plugin's version had manual changes in project?
Is there any tool available for doing this?
or tell proper method for updating ruby plugin version if some plugins may have manual changes done before in the older plugin's version.
Best method when a plugin is required or preferred *might be to copy out the old plugin to a dummy directory for reviewing later, then
uninstall the plugin, (script/plugin uninstall plugin_name)
install the old (but unmodified version) plugin (script/plugin install plugin_name_source_address) - likely either from rubyforge or github
review against the saved version you put in the dummy directory using an editor capable of differential display (that is, which allows you to compare two files for variations. Notepad++ is one freebie that will do this, but there are a ton of editors that allow diff views)
(this may or may not be something you can script. idk. I'm not that good, but I don't know of a tool that will do it all for you)
do another uninstall on the plugin to clear it out, since it's job is done,
install the new version of the plugin (script/plugin install plugin_name_source_address)
and finally edit the new plugin as necessary to accommodate any customization that was performed by you or some third party to the original utility.
I say as necessary because some of the customizations may not even be required in the newer version, although I can't say for sure...
finally, once all your patches are re-added to the new plugin and it's been tested and verified, either delete the dummy directory or archive it for future reference.
See, and I didn't even cop out with a bundler answer. You DID ask for assistance with a plugin, right? ;)
I'm not quite following you, but surely but that's what the Gemfile is for?
Take a look at Bundler
Try to run "$gem install rails"(it will install the newer version of rails) and then install watever the gem it asks finally run "$bundle install"