2017年3月17日 星期五

resposive firefox is ok chrome not

I made a page with bootstrap navbar it wrok fine in firefox when the device is mobile, the navbar is collapsed, but the chrome page is same with computer view.

after all, to add this in the head tag, it will tell browers the width is the device-width

<meta name="viewport" content="width=device-width,initial-scale=1">

ubuntu 16.04 chrome crash

ubuntu下使用chrome常常用沒多久整個系統就停住,即使更新到最新版也沒有解決

在網路上找了一下其實蠻無解的,

後來終於找到方法了,去chrome的設定->進階設定

把下面的硬體加速關掉 unchekc the gpu accerlation

用到現在好像真的解決了,有遇到的人可以試看看

  1. Go to settings in chrome.
  2. Advance Setting
  3. System > Uncheck "Use hardware acceleration..."





2017年3月16日 星期四

deploy rails passenger digitalocean error

I follow the step with the pages
https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/digital_ocean/nginx/oss/xenial/deploy_app.html

when all the work done, still can get start, you'll get this page.
 
 server {
    listen 80;
    server_name yourserver.com;

    # Tell Nginx and Passenger where your app's 'public' directory is
    root /var/www/myapp/code/public;

    # Turn on Passenger
    passenger_enabled on;
    passenger_ruby /path-to-ruby;  
 

 This line let me struggle 1 day 
take it away 
 }
 
 
 
 
 The Answer


http {

add this
    passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
    passenger_ruby /usr/local/rvm/gems/ruby-2.3.3/wrappers/ruby;


finish