Showing posts with label rails. Show all posts
Showing posts with label rails. Show all posts

Tuesday, November 8, 2016

Rails Regenerate Scaffolding Views

rails g erb:scaffold ModelName

The scaffolds can be customized by copying originals to lib/templates/erb/scaffold/templates


The original templates and generators can be found in railties gem directory like

lib\ruby\gems\2.2.0\gems\railties-5.0.0.1\lib\rails\generators


Sunday, November 6, 2016

Workaround for Ruby SSL Certificate Issue

The good and complete root certificates can be found at curl site here.

For gem download issue it should be placed in rubygems SSL certificate directory like the following path:

C:\Programs\Ruby22-x64\lib\ruby\site_ruby\2.2.0\rubygems\ssl_certs

For ruby, the root cert file path should be set in environment variable SSL_CERT_FILE like

SSL_CERT_FILE=C:\Programs\Ruby22-x64\lib\ruby\site_ruby\2.2.0\rubygems\ssl_certs\cacert.pem rails new testapp -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb

ref: https://gist.github.com/fnichol/867550