Error Installing importmap on rails application - ruby-on-rails

I am having troubling setting up an existing rails application. I am supposed to set up importmap but it is giving me trouble.
If having trouble viewing the uploaded pic, it says "rails aborted!
Don't know how to build task 'importmap:install'"
Rails error pic
If I run "rails --tasks" importmap:install does show up.
rails --tasks output snippet

As per the attached screenshot of the task list, the actual task name apparently is called app:importmap:install instead of importmap:install.
I'm not sure why that might be the case, though. It seems to me like you might (accidentally?) be working on a Rails engine instead of an actual app?

Related

Rails help message messed up

I used to be able to type rails generate or rails generate model to
get help information for different rails command lines, for some
unknown reason, now if I type rails generate or rails generate model,
it always show me the help message for rails new, what is going on?
This normally happens if you are not in a rails path, so make sure your curfrent terminal / cmd is in a directory with a rails app you can change dirfectory with cd "/putdirectoryhere"

how to personilize "bootstrap-generators" gem

Right now I'm feeling really dumb but I can't find a way to personalize the color in the gem "bootstrap-generators" I've tried to edit the color in bootstrap-variables.scss but is not working.
Bootstrap is correctly installed because it works and I tried to delete the cache folder to force rails to rebuild it but it' pointless.
I'm using rails 4.2.0 and bootstrap-generators 3.3.1
Try to do the following things for investigate problem:
1) Shutdown Rails app, clear cache (use rake tmp:clear), change color variable and run application again.
2) Try to broke bootstrap-variables.scss file. If your application really using(compile) it you will see a error.
3) Try to change any other variable. Probably you a trying to change wrong variable.

rake doesn't work when using swagger-docs

I'm using swagger-docs sample to generate my api docs, at the beginning, everything went well. but today when I use "rake swagger:docs" after I change something in controller, nothing happened.
There is no error alert. After I start the server and type url in browser, the UI didn't show what I want.
Is there any special configuration I need to do? or please just tell me how to generate the docs properly.
I had the same problem and I figured it out. But I am using AWS EC2. Just for someone may need it.
RAILS_ENV=production rake swagger:docs

How to actually use rails-settings?

I'm trying to use rails-settings gem but i'm not sure how to do that.
I've added ledermann-rails-gem gem to Gemfile, runned bundle install, generated a migration based on what's written in wiki, runned rake db:migrate, restarted a server and now, when i'm trying to do anything from rails-settings wiki, i'm getting an error.
Let's say i want to create new variable so i'm putting this code to my controller:
Settings.foo = "bar"
It gives me the following error:
uninitialized constant ApplicationController::Settings
I'm quite 'fresh' in rails development and probably there is some small thing which wasn't mentioned in the wiki because it's obvious (but not for me!). Any help would be appreciated

Rake test suddenly stopped working

I have been working with my rails application and since today I have not been able to run rake test:units
I though maybe my Ruby installation is broken or something, so I tried creating a new application, created a new model quickly, wrote a couple of unit test and then ran them. Everything seems to be running fine with the new app.
Please check the error log generated here http://pastebin.com/jgNXpXE3
Seems there's a bug in your Product model. Do you have a call to validates without any parameters passed to it?
http://api.rubyonrails.org/classes/ActiveModel/Validations/ClassMethods.html#method-i-validates

Resources