I'm trying to install and set up this gem - https://github.com/galetahub/ckeditor, but when I follow the instructions and run:
rails generate ckeditor:install
I get an error because "rails generate" is a rails 3 command (I think?!).. so my question is, what is the equivalent rails 2 command to run this?
ruby script/generate ckeditor:install
This should do it in Rails 2
Sven
Related
I am meeting a rails problem.
I created a rails folder by this command
rails new airbnb-clone -T -d postgresql --css tailwindcss
And it gave me these problems
1st
rails turbo:install stimulus:install
rails aborted!
Second
rails css:install:tailwindcss
rails aborted!
I thought that when I used the code tailwindcss, it must automatically create the tailwindcss by rails ? So why it had these error ? Should I must install tailwindcss by hand ? Could you please give me some advices?
By the way, here is my rails and ruby v
rails -v 7.0.4
ruby -v 3.1.2
Just change the argument to tailwind instead of tailwindcss:
rails new airbnb-clone -T -d postgresql --css tailwind
I use this command, you can try. I think that's oki.
rails new airbnb-clone -T -d postgresql -c=tailwind
i added a gem "acts-as-taggable-on" and when i ran the rails g acts_as_taggable_on:migration command. i got this
Could not find generator 'acts_as_taggable_on:migration'. Maybe you meant 'active_record:migration', 'test_unit:integration' or 'migration'
Run rails generate --help for more options.
how to get this migration succesfull?
I am following the Ruby on Rails tutorial by Michael Hartl. In section 6.3.1, I am trying to generate a migration file to add a Password field to my user model. Here is the code that I run:
rails generate add_passsword_digest_to_users password_digest:string
but this throws the error: Could not find generator add_passsword_digest_to_users.
i have used the rails generate command before and it worked perfectly. I'm not sure why I am getting this problem now.
version: Rails 3.2.8, ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
Try:
rails generate migration add_passsword_digest_to_users password_digest:string
You simply forgot migration which is the generator to use for the other arguments.
You have forget to include migration in the command. You can simply do
rails generate migration add_passsword_digest_to_users password_digest:string
I am trying to use PDFKit using rails 3, I followed the railscast tutorial and found that I get the following error:
: undefined method `wrap_parameters' for ActionController::Base:Class (NoMethodError)
http://railscasts.com/episodes/220-pdfkit
Maybe you're accidentally loading Rails 3.0.x on a Rails 3.1 application?
It won't work if you generate a Rails 3.1 application, which adds config/initializers/wrap_parameters.rb, and then try to boot it with Rails 3.0.x.
If you want Rails 3.1:
Are you running with bundler, e.g. bundle exec unicorn_rails or bundle exec rake?
If you want Rails 3.0.x:
Regenerate the application by running rails new appname to see what needs to change.
I just installed Rails 3 and created my first app. The install of Rails3 + ruby 1.9 went very smoothly but I am missing the generate script in script/generate.
I have created a new app from scratch with no options to verify.
Any idea why this is happening and how to fix it?
all script/* commands has been removed from rails 3. You should use rails generate or rails g instead of script/generate, rails server or rails s instead of script/server and so on.
try
rails generate ...
the only script existing now is rails all others will be called as parameter of rails.
Take a look a the Ruby on Rails Guides: Getting Started with Rails