Ruby
ç°å¢ Rails 4.1.8 CentOS(éçºç°å¢) heroku ç®ç Railsã§ç»é¢ãPDFã§åºåã§ããããã«ãã herokuã§ãä¸è¨ã®ãã¨ãã§ãã 1. PDFåºåGemã®é¸å® ããã¤ãããããä»åã¯ç»é¢ããã®ã¾ã¾PDFåºåã§ããã°ããã®ã§PDFkitãWicked PDFã®äºæã ã£ãã PDFkitã®æ¹ãPâ¦
ç°å¢ Rails 4.1.8 NewRelic heroku ç®ç herokuNewRelicãã¤ã³ã¹ãã¼ã«ãã herokuãsleepããã®ãé²ã1. heroku ã³ãã³ãã§newrelicãã¤ã³ã¹ãã¼ã«ãã heroku addons:add newrelic:stark 2. Gemfile ã«ä»¥ä¸ã追è¨ãã¦ãbundle installãã gem 'newrelic_râ¦
ç°å¢ Rails 4.1.8 Bootstrap3 twitter-bootstrap-rails 3.3.2.0 heroku ç®ç herokuã§bootstrapã®CSSãfontãåæ ãããã㨠fontawesomeãè¦ã¤ãããªãã¨ã©ã¼ãåºãªããã¨1. config/environments/production.rb ã®è¨å®ãæ¸ãæãã config.serve_static_assâ¦
ç°å¢ Ruby 2.1.5 Rails 4.1.8 CentOS 6.6 heroku ç®ç Railsã¢ããªã®ã»ãã·ã§ã³ã¹ãã¢ããã£ãã·ã¥ããRedisã«åãæ¿ãã éçºç°å¢ã«Redisãµã¼ããç«ã¦ã æ¬çªç°å¢ã¯herokuã§Redisã®ã¢ããªã³ãå ¥ãã 1. éçºç°å¢(CentOS)ã«Redisãµã¼ããç«ã¦ã # åèã«ããâ¦
ç°å¢ Rails 4.1.8 jQuery ç®ç Ajaxéä¿¡ä¸ã«ã¤ã³ã¸ã±ã¼ã¿(ã°ã«ã°ã«)ã表示ããã¦ãéä¿¡çµäºå¾ã«é表示ã«ããã ã¤ã³ã¸ã±ã¼ã¿è¡¨ç¤ºä¸ã¯ã¢ã¼ãã«ã®æ§ã«åéæã®ã¬ã¤ã¤ã¼ã被ãã¦ããã¿ã³æ¼ä¸çãã§ããªãããã«ãã 1. ã¤ã³ã¸ã±ã¼ã¿(ã°ã«ã°ã«)ã®gifç»åãDLããâ¦
ç°å¢ Ruby 2.1.5 Rails 4.1.8 ç®ç Railsã¢ããªããDropboxã«ãã¡ã¤ã«ãã¢ãããã¼ããã 0. Dropboxã¢ã«ã¦ã³ããåå¾ããä¸è¨ããDropboxã®ã¢ããªãä½æãã Login - Dropbox â»ãã£ããã£ãå°ãå¤ããä¸è¨ã®ãµã¤ããåèã«ãªã Dropbox APIãRuby on Railsâ¦
ç°å¢ Rails4.1.8 heroku SendGrid ç®ç productionã¢ã¼ã(heroku)ã§ã¡ã¼ã«ãéããããã«ãã 1. herokuã«ã¢ããªã³ SendGridãã¤ã³ã¹ãã¼ã« # heroku login # heroku addons:add sendgrid:starter 2. herokuããè¨å®ãåå¾ # heroku config:get SENDGRID_USEâ¦
ç°å¢ Rails 4.1.8 Bootstrap3 twitter-bootstrap-rails 3.2.1 ç®ç 1. æ¹è¡ãå«ãæç« ãI18nã§å®ç¾©ãã 2. DBã®ãªãã¢ãã«ã®attributsãæ¥æ¬èªåãã1. xxx_html ã§å®ç¾©ããã¨ã¨ã¹ã±ã¼ããããªã # config/locales/ja.yml body_html:| ï¼è¡ç®<br /> ï¼è¡ç® # View â¦
ç°å¢ Rails 4.1.8 Bootstrap3 twitter-bootstrap-rails 3.2.1 ç®ç Railsã®ãã©ã¼ã ãã«ãã¼ã使ããAjaxã§ãã¡ã¤ã«ãã¢ãããã¼ããããã form_forã§remote:trueããã ãã§ã¯ActionController::InvalidAuthenticityTokenã¨ããã¨ã©ã¼ã«ãªãã1. gem ã®ã¤ã³â¦
ç°å¢ Rails 4.1.8 Bootstrap3 twitter-bootstrap-rails 3.1.1 ç®ç gem ã§bootstrap3ãã¤ã³ã¹ãã¼ã«ãã¦ãbootstrap3ã¢ã¤ã³ã³ãã©ã³ãã表示ããããã¨1. fontsãã¡ã¤ã«ãã³ãã¼ãã bundle install ããtwitter-bootstrap-railsã®ãã©ã«ãããfontsãã¡ã¤ã«â¦
ç°å¢ Rails 4.1.8 Bootstrap3 ç®ç éµä¾¿çªå·ãå ¥åããæ¤ç´¢ãã¿ã³ãæ¼ä¸ããã¨ãä½ææ¬ã«æ¤ç´¢çµæãèªåè£å®ããããã¨ã éµä¾¿çªå·æ¬ã«ãã©ã¼ã«ã¹ãå½ããã¨ãã¼ã«ãããã表示ããããã¨*1 ã½ã¼ã¹ã³ã¼ã éµä¾¿çªå·æ¤ç´¢ã«ã¯ãAjaxZip3ãã¨ããã©ã¤ãã©ãªã使â¦
ãªããªãè¦æ¦ããã®ã§åå¿é²ã¨ãã¦ãããªãã¼ã·ã§ã³ã®ããæ¹ã¨ã¡ãã»ã¼ã¸ã®æ¥æ¬èªã®2æ¬ç«ã¦Rails3.2 ãã¹ãããã¢ãã«ã®ããªãã¼ã·ã§ã³ ä¾)ã客(Customer)ã«æ³¨æ(Order)ã1対å¤ã§ç´ã¥ãå ´åã ã客ãç»é²ããæã«ä¸ç·ã«æ³¨æãè¤æ°åç»é²ããã Model # custoâ¦
datepickerã追å ãã¦åºãã¨ã©ã¼ Ruby 1.9.3 Rails 3.2 ã¨ã©ã¼ couldn't find file 'jquery-ui' 対å¦æ³ # assets/javascripts/application.js //= require jquery //= require jquery-ui â # assets/javascripts/application.js //= require jquery //= requâ¦
åã®è¨äºã§èª²é¡ã ã£ãé¨åãå¥ã®ã©ã¤ãã©ãª(axlsx)ã使ã£ã¦è§£æ±ºã ãã ããaxlsxã¯ã¨ã¯ã»ã«ã®èªã¿è¾¼ã¿ã¯ã§ããªããããé½åº¦æ¸å¼çãä½æãããã¨ã«ãªãã axlsxã®æ¥æ¬èªã§ã®æ å ±ãå°ãªãã®ã§ãåèã«ãªãã°ã¨ã ä½æããã³ã¼ãã®ä¸é¨æç²ã»æ¹å¤ã®ãããã³ãâ¦
ç®ç ã»Rails ã§DBã®ãã¼ã¿ãã¨ã¯ã»ã«ã«å¸³ç¥¨ã¨ãã¦åºåãã¦ããã¦ã³ãã¼ãã§ããããã«ãã ã»ã¨ã¯ã»ã«ã¯ Spreadsheetã§ä½æ ã»å¸³ç¥¨ã¯äºããã³ãã¬ã¼ããç¨æããå¤ãæ¸ãè¾¼ã ã»ã¨ã¯ã»ã«ãã¡ã¤ã«ã¯ç»é¢ãããã¦ã³ãã¼ã èª²é¡ ã»â»1ï¼åå¹ ãããã©ã«ãã§ä¿åâ¦
ã»ã¬ã¯ãããã¯ã¹ãé¸æãããéåæéä¿¡ã§DBãæ´æ°ãã ã»ã¬ã¯ãããã¯ã¹ãå¤æ´ããæç¹ã§éåæéä¿¡ã§DBæ´æ°ãææ°ã®ç¶æ ã表示ããã formã®:remote => true ã®ããã«ãã¿ã³ãç¨ããªãAjaxã®å®è£ ã ä¸è¦§ç»é¢ã§ã¹ãã¼ã¿ã¹ã®ã¿ãæ´æ°ãããããã£ã«ã¿ã¼æ©è½â¦
ç®çï¼èªè¨¼æ©è½(ã¦ã¼ã¶ã¯äºãDBã«ç»é²) åè http://starryskylogic.blogspot.jp/2012/04/ruby-on-rails32.html1.Gemfileã«bcryptrubyã追å Gemfileå ã®gem 'bcrypt-ruby', '~>3.0.0~ã®ã³ã¡ã³ãã¢ã¦ããå¤ããä¸ã§bundle install2.User modelã®ä½æ rails gâ¦
Ruby1.9ç³» Rails3ã§csvãã¡ã¤ã«ããã¦ã³ãã¼ããã(ã¨ã³ã³ã¼ãåé¡ã«ã対å¿) Rails 3.2.3 ruby 1.9.3ä¸è¨ã½ã¼ã¹ã§ã²ã¨ã¾ãåãã¦ãã require 'kconv' require 'csv' columns = Person.all file_name = Kconv.kconv("sample.csv", Kconv::SJIS) header = ["â¦
Cloud Foundryä¸ã«ã¢ããªãæ§ç¯ããã£ã¦ã¿ã(Windowsç·¨) VMwareãå§ããPaaS "Cloud Foundry"ã試ãã«ä½¿ã£ã¦ã¿ãã æåã¯è±èªã®ããã¥ã¢ã«ãããªããã¢ã«ã¦ã³ããçºè¡ãããã¾ã§ã®ã¤ãªã㧠訳ããããã¦ãããæ¥æ¬èªè¨³ãã³ãã¥ããã£ãµã¤ãã«ç»å ´ââ ã§ãWinâ¦
é åå ã®å¤ã®ãã¥ãããå«ãå ´å ãã§ãã¯ããã¯ã¹ã§é¸æããæ¡ä»¶ã§æ¤ç´¢ããå ´åã®SQL ary = [1,2,5] condition = ['category = (?)', ary] ãã¤ã³ãã¯(?)ãé常㯠'category = (1,2,5)'ã¨ãªããããï¼ã¯()ã®ä¸ã«å ¥ãäºã«ãªãã condition = ['category = ?',â¦
Rubyã§ã¡ã¼ã«ãéä¿¡ãã Rubyã«ã¯SMTPãæ±ãã©ã¤ãã©ãªãããã åã«ã¡ã¼ã«ãéã require 'net/smtp' #SMTP.start ã§ã»ãã·ã§ã³ãéã #第ä¸å¼æ°ããµã¼ãã®ã¢ãã¬ã¹ã§ç¬¬äºå¼æ°ããã¼ãçªå· #ãããã¯ã使ãã¨ã»ãã·ã§ã³ã®çµäºãèªåçã«ãã£ã¦ãããã Net:â¦
iï¼æ£è¦è¡¨ç¾ã¯ãããæã«å¤§æåå°æåã®åºå¥ãè¡ããªã oï¼ä¸çªæåã«æ£è¦è¡¨ç¾ã®è©ä¾¡ãè¡ãããæã«ä¸åº¦ã ãå¼å±éãè¡ã mï¼è¤æ°è¡ã¢ã¼ããæ£è¦è¡¨ç¾ "." ãæ¹è¡ã«ããããããããã«ãªã xï¼æ£è¦è¡¨ç¾ä¸ã®ç©ºç½(æ¹è¡ãå«ã)ãç¡è¦ããã ã¾ããããã¯ã¹ã©ãã·â¦
xlsãã¼ã¿ãèªã¿è¾¼ãããã«ã¯ããã¤ãã®æ¹æ³ããããããã Win32APIãParseExcelãSpreadsheetã¨ããã©ã¤ãã©ãªãããããã ã Win32APIã¯Windowsç°å¢ä»¥å¤ã ã¨åããªããããã ç¨èª ãã¼ã¹ï¼ããã°ã©ã ã®ã½ã¼ã¹ã³ã¼ããXMLææ¸ãªã©ãä¸å®ã®ææ³ã«å¾ã£ã¦è¨â¦
æ¿å ¥ã¨ä¸¦ã³æ¿ã #Rangeãªãã¸ã§ã¯ãã®ããããã£ã®ããã«ãInsertããæ¸ãã ã #Rangeããã¾ãå¤ãããã¨ã§ã»ã«ãåãè¡ã®æ¿å ¥ãã§ãã sheet.Range("C:C").Insert Rangeã¯æåã§æ¿å ¥ãè¡ãæã«ã¢ã¯ãã£ãã«ããã»ã«ã¨åããªã®ã§å®¹æ #ããã«ã©ã ãåºæºã«ä¸¦â¦