Translate

Monday, August 10, 2015

How to create a symbolic Link in linux



Basically, to create a symbolic  link in Linux you have to use the  command called ln as follows:
  
    ln -s /var/www/myapp/web/ /html/customerapp

  
the command ls has two parameter the target(/var/www/myapp/web/) and the source (/html/customerapp). The target  is the existing file/diretory and the source the file to be created.


Wednesday, August 5, 2015

Routing Error No route matches [GET] "/users/logout"




The message "Routing Error No route matches [GET] "/users/logout" is because you are sending the request via get and should be delete, so to fix it you have two options:

 The first one  is the  better, change the tag  link_to to button_to, doing that, rails will  do  the dirty work to send it as  a delete request.

The second one is not recommended, since DELETE is the appropiete RESTFUL query , but it works. Got to devise.rb change  config.sign_out_via = :delete to config.sign_out_via = :get