Pages

Wednesday, 23 December 2015

rbenv, ruby remote interpreter, rubymine, vagrant => Everything you need to know!

                                                      So guys all i was doing when working with laravel, django or rails with vagrant is i have to configure both my host as well as guest environment to work with software(python(Django), PHP(Laravel), Ruby(Rails)) and things become pretty shitty when railsinstaller incase of windows doesn't supporting new versions of Ruby as well as Rails .... Django-python & Laravel-php doesn't have these problems as they have better support on windows as well as on Trusty64 guest machines.

So incase of ruby all you have to do is set the remote interpreter instead of the local interpreter installed in windows. So open the setting and search for interpreter and add the remote interpreter by clicking on the '+' sign. then search for ruby interpreter it will give path to shims directory in .rbenv but you have to go into the versions directory and mark my words select "irb" instead of ruby as it wants ruby interpreter(irb) instead of ruby. This will solve the whole problem. Thats it!

P.S. => Software_Devs@JETBRAINS are doing awesome job! It's really time to say gudbye to sublime(no offence) :p 

Saturday, 28 November 2015

clearing screen & pasting using "CTRL + v" in windows command prompt.

Things become quite frustating when you just migrated from linux desktop world to windows world!
Specially tasks which uses terminal or command prompt(in windows) ... So, today i found these two awesome script's of autohotkey.. todo these tasks same as we do in linux world.
Simply download autohotkey from https://autohotkey.com and make two scripts with .ahk extension for example for pasting in terminal make copypaste.ahk and for clearing screen make clearingscreen.ahk and add the following code in both the file

;-----------------------------------------------------------------------------------------------------------------
;for pasting data

#IfWinActive ahk_class ConsoleWindowClass
^V::
SendInput {Raw}%clipboard%
return
#IfWinActive.
;-----------------------------------------------------------------------------------------------------------------

;for clearing screen in command prompt
; -------------------------------------------------------------------------
; Cntr-L should clear screen
; -------------------------------------------------------------------------
#IfWinActive ahk_class ConsoleWindowClass
^L::
Send cls{Enter}
return

#IfWinActive
;---------------------------------------------------------------------------------------------------------------------

After making these two files just double click and run 'em! thats it.
WARNING:- Things will easily break and become serious pain in head if you run vagrant ... so tip is suspend them from the arrow(in TASKBAR). Thanks!

Thursday, 19 November 2015

[Solution] Vagrant can't mount shared folder in VirtualBox in Windows 8.1 OS!

                                    So to fix this problem all you need to do is install a plugin vagrant-vbguest using vagrant and the problem will be fixed. If you face troubles will installing vagrant-vbguest then go to this LINK=>[Solution of Vagrant plugin installation failure problem] and then just run the following command in command prompt as shown in the pic below.


after installation halt the vagrant using command vagrant halt and then run vagrant up and after that shared folder will mount in both windows and linux, fixed!

[SOLUTION] Vagrant Plugin Installation failure in Windows 8.1 OS

                                             The problem exist in ruby for windows ... it has some issues related to space in folder names and by default vagrant home is the C:/users/your user name/.vagrant.d all you need to do is to set the environment variable VAGRANT_HOME to something like C:/Vagrant/Home .... so to do it first make the folder Vagrant in C drive and then make another folder in Vagrant directory i.e. Home ... So you have something like this C:/Vagrant/Home
                                                                                   After making the folder run the following command in windows command prompt as shown in the pic below


After running this command RESTART windows and then vagrant plugins will install and the problem is fixed!


Friday, 16 October 2015

Solved! mysql2 (0.4.1) ain't working on rails 4.2.4!

                                   


                                      So, guys you have worked with rails with mysql and everything worked great untill you upgraded your version of rails to 4.2.4 and you got stuck connecting rails to mysql ... following error pops up "Specified 'mysql2' for database adapter, but the gem is not loaded. Add gem 'mysql2' to your Gemfile(and ensure its version is at the minimum required AciveRecord)."

and the patch i applied is i downgraded the gem mysql2 from version 0.4.1 to version 0.3.18.. and it worked!

to downngrade mysql2 add the following line in the Gemfile in place of gem 'mysql2'  like this

gem 'mysql', '~> 0.3.18'

and after that simply run bundle install !! Bundle will pull the dependencies and so in the Gemfile.lock file you will see the mysql2 version downgraded from 0.4.1 to 0.3.18! fixed.

Saturday, 26 September 2015

Kubuntu Flickering | Amd Radeon | Solved | Swapnil Singh

                                                          Hey guys in this post i'm gonna show you how to stop flickering in kubuntu 15.04. So open the terminal and add the following command in terminal.

sudo nano /etc/X11/xorg.conf

and add the following lines in the file

Section "Device"
 Identifier     "Configured Video Device"
 Driver "radeon"
EndSection

thats it.

Wednesday, 23 September 2015

Terminator in Kali Sana 2.0 | Swapnil Singh

                                  hey guys in this post i'm gonna show ya'll how to install the most powerful fully featured linux terminal emulator in kali sana 2.0 i.e. Terminator !
So basically all you need to do is type the following command in kali sana 2.0


This command will basically install terminator in your kali sana 2.0 ... and here is how your new terminal emulator looks in kali sana



The main advantage of using terminal emulator like terminator is that you can split your screen vertically or horizontally so that you can monitor multiple screens/processes at same time like shown in the picture below.


Cool, isn't it ?? Feel free to comment in the comment section if you have any problem related to kali sana :)