OpenID_engine & Ruby on Rails

筆記一下。(?)

$ rails openidtest
$ cd openidtest/
$ script/generate model user
$ script/plugin install git://github.com/terrbear/openid_engine.git
$ rake open_id_authentication:db:create
$ rake db:migrate
$ vim config/routes.rb

map.root :controller => “welcome”

$ script/generate controller welcome
$ mv public/index.html public/index.html.bak
$ vim app/controllers/welcome_controller.rb

class WelcomeController < ApplicationController
before_filter :signin_required

def index
end
end

$ vim app/views/welcome/index.html.erb

<%= @current_user.identity_url %>

$ git init
$ git submodule add git://github.com/rails/rails.git vendor/rails (? 1,2)
$ cd vendor/rails/
$ git checkout origin/2-3-stable
$ sudo vim /usr/local/lib/ruby/gems/1.9.1/gems/ruby-openid-2.1.7/lib/openid/consumer/html_parse.rb (?)

-/mixu
+/mixn

$ sudo gem install thin (?)
$ cd ../..
$ thin start

CC BY-SA 4.0 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Leave a Reply

Your email address will not be published. Required fields are marked *