preloader
軟體工程 Deploy problems when upgrading to rails 5.2.0 from 4.2.5

Capistrano 部署 production 環境 從 Rails 4.2.5.1 升級到 Rails 5.2.0 的環境時遭遇了兩個問題 Cannot find gem bundler >= 0.a Solution for your production environment: reinstall rvm and bundler gem rvm implode rvm get head rvm reload rvm reset rvm use 2.4.1 rvm gemset create rails5.2.0 rvm use [email protected] --default gem install bundler which bundle modify config/deploy.rb content and

read more
軟體工程 Vim editor config for my php, ruby and rails environment

I use many plugin with VIM to boost development when I writing and debugging programs, which are written through PHP and Ruby languages. Also there are few plugin for SASS, RSpec and Javascript. Below are configurations for my VIM editor and Vundle. There must some corresponded software be installed in the computer first and then these settings will work. nnoremap means normal mode in VIM. Usage of <silent> tag is

read more
軟體工程 No routes matches ‘/users/sign_out’ of Devise gem using jquery-migrate-min.js in Rails 4

Situation: After trying to use slick plugin of jquery using log-in user, I want to sign out. The screen shows 'No routes matches '/users/sign_out' ' when I click the link of sign-out. Before trying slick plugin, /users/sign_out route of devise gem works as normal. Cause: The addtional js jquery-migrate-min, which required for slick plugin, makes rails misunderstood original route for /users/sign_out . Environment: Rails 4.2.5.1, Devise 3.5.5, Jquery-migrate-rails 1.2.1 Solution:

read more
軟體工程 Configurations and programming examples about Grape, Doorkeeper and Wine_bouncer in a rails 4 app

This article works for both of production and development environment and not like other articles only work for development. The tested environment are Rails 4.2.5.1, Ruby 2.3.0, Doorkeeper 3.1.0, Grape 0.14.0, Grape-kaminari 0.1.8, Wine_Bouncer 0.5.1 and Devise 3.5.5 . 1. Sample configuration for Grape gem in Rails app projects. 列出Grape gem的設定檔範例 In config/application.rb, add below two

read more
軟體工程 Inquiry Rails ActiveRecord records between two dates

Follow below code for inquiring ones in ActiveRecord between two dates: YourModel.find(:date => somenumber.days.ago..Date.today) # or YourModel.find(:created_at => yourNumber.years.ago..Date.today) # or YourModel.find(:updated_at => yourVariable.months.ago..Date.yesterday) Aboved code are modified from a post at stackoverflow.com. Reference: http://stackoverflow.com/questions/2381718/rails-activerecord-date-between

read more

About

Howard Lee, Frontend-engineer with Angular 7+, Typescript, ReactJS, VueJS. Flutter, Dart, PHP, Ruby, JavaScript, HTML, SASS, CSS, Postgres, MySQL, Web Developer. Have a certificate of AWS Solution Architect Associate with verify number: 8FYNL55LCEEQ10W5. You can verify at AWS Certificate site or Credly site Tech lead role Lead 4 colleagues to build products and infrastructure Coordinate schedule of delivering products Senior web frontend developer role Products Form-filling, form-sharing, file-management, repair-managemnt and project-management for construction industry at Suiqui IoT management and EC platform for Liquid Petroleum Gas(LPG) at Wave-In Comm.

Know More

Tag

Social