Libraries.io ! your best online repository browser …

When I’m googling something web related stuff on my browser I’ve accidentally pointed to a website called libraries.io. Oh ! what a magic :-O .

libraries.io.png

So I’ve decided to dig into that site. The site says it monitors many libraries across popular package managers.If you have github,gitlab or bitbucket you’ll be able to sign in to libraries.io with that any account credentials. It is a benefit without creating any new account or email.

signin

 

signin_2.png

After sign in you’ll be able to view and monitor you github or bitbucket repositories with that site . It is easy when you want to monitor your  all repositories in one location 🙂 . Also this site shows the sources updates of libraries that are used in your own repository 🙂 .

depend_libraries

whoa 😀 , it is cool feature that I’ve seen on this site. That is called repository monitoring. This feature is free and can be enabled according to the below screenshot 🙂

repo_monitoring

When there are new component updates for your repository libraries.io send you notification emails as in below screenshots.

update_notifications_1

update_notifications_2

Ok , thats about libraries.io . Go and experience it :-).

Have a nice day 🙂 !

 

Advertisements
Libraries.io ! your best online repository browser …

How to create your first ROR app with mysql database support on windows?

When you are creating your first app on ruby on rails it default supports “sqlite” database. You can see it while open the “Gemfile” of  your project using a text editer like “Sublime Text”. When your app’s data are growing  bigger n bigger the “sqlite” is not suitable to store that data. So there are some alternative database systems for that like “mysql”,”postgresql” or “oracle”. My preferred choice is mysql. So .in this post I’ll show you how to create you first ROR app that includes mysql database support.

First you have to install gemfile for mysql . This can be install issuing the following command in the terminal window.

 gem install mysql2

After that you can see the following progress on the terminal window

installing_mysql2_rubygem_on-windows

Then issue the following command to create new rails app that includes mysql support

 rails new testr -d mysql

After few minutes that will create your new rails app.

Now move to the development directory issuing the following command on terminal window.

 E:\>cd testr

Then issue the following command in  the terminal to run the app

 E:\testr> rails server

rails-_boot_up

Then open your web browser and  type the following url in the address bar

 http://localhost:3000

database_error

Oops.. ! . There is an error occurred 😦 . What can we do to resolve that error ?.

Ok, lets examine the database.yml in your app directory (in my example testr) using “Sublime Text” editor.

database_yml_sublime

It shows us that there is a predefined database “testr_development” and we haven’t a database in our mysql server.

So to get rid of this we open the mysql command line interface and must issue the following command in it

 mysql> create schema testr_development;

testr_database_schema

After that refresh the browser window and also see the terminal window. You can see that following  result shows mysql is correctly configured with you project.

terminal_suucess_rails.png

suucess_ror_mysql

Yay! Now you know how to make ROR app with the support of mysql database.

Thats all .

Have happy coding and have a nice day 🙂 !

How to create your first ROR app with mysql database support on windows?

How to update the ruby version on heroku ?

When we want to update the ruby version of our heroku hosted ruby website, heroku eventually send a notification for it when there is need to update the ruby version of the heroku app.

This post shows how to update the ruby version on heroku,

These are the prerequisites on your windows machine before begin the update process

  1. Node.js
  2. Ruby 2.2.4
  3. Heroku toolbelt
  4. Git 1.8.6 >

That’s it.

Then you have to login to heroku account using this command

$ heroku login

 

 

 

Then you have to clone the site folder using git.

 

 

 

After that you have to move to the cloned site folder

 

If you want to update the bundler version of your site issue the following command inside the folder

 

 

Then configure the heroku build packs if your heroku ruby project issuing following command

 

 

 

To lock the bundler version if you have encountered an error we must have to lock it to specific version issuing following command in the terminal

heroku-lock-bundler-version

After that open the gem file using your favorite text editor “notepad++” or “sublime text”

Then you have to add the following line to your ruby gem file inside your cloned folder.

You must add this line after the “source ‘https: //rubygems.org’ ” line

ruby “2.2.4”

sublime_edit_gem_file

https://devcenter.heroku.com/articles/ruby-versions

Then save the gem file, that’s all

There is no need to change the other lines of this file

Then issue the following commands one by one to push the source repository to the heroku.

 

 

 

 

That’s all after that you’ll see following successful progress screen

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This is the final result after updating the ruby version “2.0.0” to “2.2.4”

final

Thats all . Have a nice day 🙂 !

 

How to update the ruby version on heroku ?