Friday, November 25, 2016

Add to Local Maven Repo, then use it Gradle

Install downloaded jar file (here sqlserver jdbc driver) in local maven repository

mvn install:install-file -Dfile=sqljdbc41.jar -DgroupId=com.microsoft.sqlserver -DartifactId=sqljdbc4 -Dversion=4.1 -Dpackaging=jar

In gradle file add mavenLocal() and use the lib as normal maven dependency.


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