うちのいぬ Tech Blog

Tech Blog of Uchinoinu/My dog

Gem

422 error at creating User record in User Model using Devise

症状 RailsでJSON API用のバックエンド(管理画面はactive adminを利用し、そこだけはhtmlを利用)を作っています。 認証周りにDeviseを利用しました。 Routingは↓な感じで。 # config/routes.rb namespace :api, format: 'json' do namespace :v1 do devise…

401 when access to /admin with JSON-API backend by Rails

症状 何事も無ければ、active_adminを使っている場合、/adminにアクセスしたら、以下の様な画面が見れるはずです。 しかし、今回こんな感じになりました。 Started GET "/admin" for ::1 at 2015-05-12 18:06:23 +0900 Processing by Admin::DashboardContro…

annotate gem: write schema or routing on model file, routes file

(source: http://whyzat.com/wp-content/uploads/2014/04/Useful-Dog.jpg) Version Ruby # 2.2.1 Rails # 4.2.0 Install $ vi Gemfile -------- # add gem 'annotate' -------- $ bundle install Make Config File(Task File) $ bundle exec rails g annotat…