I am trying to setup VirtualX Assessment Software that I downloaded online.
Here is the link where I got it: https://virtualx.sourceforge.net/download.html
I managed to make it run where I was able to load its webpage but there are still some functions where I'm getting an error.
Here, I'm trying to approve a test account that registered to the platform:
When I hit approve, here is the error that I'm getting:
Here is the content of routes.db
Virtualx::Application.routes.draw do
get "errors/not_found"
get "subcategory/index"
get "subcategory/list"
get "subcategory/show"
post "subcategory/save"
post "subcategory/update"
get "subcategory/edit"
get "subcategory/new"
get "subcategory/destroy"
post "subcategory/destroy"
#resources :article
get "article/index"
get "article/show"
get "article/list"
get "article/comment"
post "article/comment"
get "article/new"
post "article/save"
get "article/edit"
post "article/update"
get "article/news"
get "article/destroy"
post "article/destroy"
get "article/delete"
post "article/delete"
match '/getBlogcategory' => 'article#getBlogcategory'
match '/thumbsUp' => 'article#thumbsUp'
match '/thumbsDown' => 'article#thumbsDown'
match '/delete_comment' => 'article#delete_comment'
get "blog_category/index"
get "blog_category/list"
get "blog_category/show"
post "blog_category/save"
post "blog_category/update"
get "blog_category/edit"
get "blog_category/destroy"
post "blog_category/destroy"
get "blog_category/new"
match '/subcategory' => 'blog_category#subcategory'
match '/subcategory_article' => 'blog_category#subcategory_article'
match '/blog' => 'blog_category#blog'
match '/categoryArticle' => 'blog_category#categoryArticle'
resources :users do
get :autocomplete_user_name, :on => :collection
end
resources :folders
get "folders/index"
get "folders/new"
get "folders/create"
post "folders/create"
get "assets/destroy"
post "assets/destroy"
match "browse/:folder_id" => "folders#browse", :as => "browse"
match "browse/:folder_id/new_folder" => "folders#new", :as => "new_sub_folder"
match "browse/:folder_id/new_file" => "assets#new", :as => "new_sub_file"
match "browse/:folder_id/rename" => "folders#edit", :as => "rename_folder"
match '/getName' => 'folders#getName'
match '/unshareFolder' => 'folders#unshareFolder'
resources :assets
get "assets/index"
get "assets/new"
get "assets/create"
post "assets/create"
get "assets/destroy"
post "assets/destroy"
match "assets/get/:id" => "assets#get", :as => "download"
match "assets/share" => "assets#share"
match "assets/unshare" => "assets#unshare"
match '/lock' => 'assets#lock'
match '/unlock' => 'assets#unlock'
resources :aboutus
resources :clientinfo
resources :images
#get "images/index"
#get "images/new"
match '/view_aboutus' => 'home#view_aboutus'
match '/view_clients' => 'home#view_clients'
match '/view_features' => 'home#view_features'
match '/view_modules' => 'home#view_modules'
match '/view_contactus' => 'home#view_contactus'
match '/deleteUsersubject' => 'users#deleteUsersubject'
match '/clientImage' => 'images#clientImage'
match '/createClientimage' => 'images#createClientimage'
get "/questions/question_type_listing"
post "/questions/new"
resources :questions do
member do
get "delete_option"
post "delete_option"
get "delete_match_option"
post "delete_match_option"
get "delete_matrix_row"
post "delete_matrix_row"
get "delete_matrix_column"
post "delete_matrix_column"
get "delete_hrcl_option"
post "delete_hrcl_option"
get "saveImage"
post "saveImage"
end
end
#post "questions/publish_unpublish"
#get "questions/publish_unpublish"
match '/publish_unpublish' => 'questions#publish_unpublish'
match '/unpublish' => 'questions#unpublish'
match '/share' => 'questions#share'
match '/saveImage' => 'questions#saveImage'
match '/sharewithCategory' => 'questions#sharewithCategory'
match'/checkMark' => 'questions#checkMark'
match'/viewQuestion' => 'questions#viewQuestion'
get "subjects/add_subject_category"
resources :subjects
post "subjects/cs"
resources :categories
resources :category_titles
resources :emails
post "attend_exams/confirm_exam"
get "attend_exams/confirm_exam"
post "attend_exams/reject_exam"
get "attend_exams/reject_exam"
resources :attend_exams
get "attend_exams/index"
match '/examination' => 'attend_exams#examination'
match '/instruction' => 'attend_exams#instruction'
match '/evaluation' => 'attend_exams#evaluation'
match '/evaluation' => 'attend_exams#ramdomizeQuestions'
match '/examComplete' => 'attend_exams#examComplete'
match '/calculateScore' => 'attend_exams#calculateScore'
match '/windowClose' => 'attend_exams#windowClose'
match 'welcome/examinee_dashboard' => 'welcome#examinee_dashboard'
#get "exams/attend_exam"
#post "exams/attend_exam"
resources :exams
# member do
#get "exams/index"
# end
#end
match '/scheduleExam' => 'exams#scheduleExam'
match '/selectQuestion' => 'exams#selectQuestion'
match '/assignQustions' => 'exams#assignQustions'
match '/selectExaminee' => 'exams#selectExaminee'
match '/assignExaminees' => 'exams#assignExaminees'
match '/previewExam' => 'exams#previewExam'
match '/deleteExamQuestion' => 'exams#deleteExamQuestion'
match '/deleteExamUser' => 'exams#deleteExamUser'
match '/getMark' => 'exams#getMark'
match '/assignExam' => 'exams#assignExam'
match '/groupExam' => 'exams#groupExam'
match '/updateMark' => 'exams#updateMark'
match '/examtype' => 'exams#examtype'
match '/create_examtype' => 'exams#create_examtype'
match '/listExamtypes' => 'exams#listExamtypes'
match '/editExamtype' => 'exams#editExamtype'
match '/deleteExamtype' => 'exams#deleteExamtype'
match '/updateExamtype' => 'exams#updateExamtype'
match '/getExam' => 'exams#getExam'
match '/showEvaluationtype' => 'exams#showEvaluationtype'
match '/hideEvaluationtype' => 'exams#hideEvaluationtype'
match '/evaluate' => 'exams#evaluate'
match '/getExamQuestions' => 'exams#getExamQuestions'
match '/manualEvaluation' => 'exams#manualEvaluation'
match '/finishEvaluation' => 'exams#finishEvaluation'
match '/getCategoryexams' => 'exams#getCategoryexams'
match '/assignEvaluator' => 'exams#assignEvaluator'
match '/getEvaluator' => 'exams#getEvaluator'
match '/evaluator' => 'exams#evaluator'
match '/delete_evaluator' => 'exams#delete_evaluator'
match '/completedExams' => 'attend_exams#completedExams'
match '/pendingExams' => 'attend_exams#pendingExams'
match '/updateCategory' => 'category_titles#updateCategory'
match '/deleteCategory' => 'category_titles#deleteCategory'
get "settings/index"
post "settings/update"
get "feedback/index"
match '/assign' => 'feedback#assign'
match '/unassign' => 'feedback#unassign'
match '/viewFeedback' => 'feedback#viewFeedback'
match '/submitFeedback' => 'feedback#submitFeedback'
match '/viewfeedbackResponse' => 'feedback#viewfeedbackResponse'
match '/feedbackResponse' => 'feedback#feedbackResponse'
get "reports/index"
get "results/index"
match '/usersResult' => 'results#usersResult'
match '/resultIndex' => 'results#index'
match '/viewUserResult' => 'results#viewUserResult'
match '/groupResult' => 'results#groupResult'
match '/examsResult' => 'results#examsResult'
match '/viewExamResult' => 'results#viewExamResult'
match '/departmentResult' => 'results#departmentResult'
match '/viewDepartmentResult' => 'results#viewDepartmentResult'
#get "examination/index"
# get "reports/generateDepartmentReport"
match '/userReport' => 'reports#userReport'
match '/viewuserReport' => 'reports#viewuserReport'
match '/examReport' => 'reports#examReport'
match '/viewexamReport' => 'reports#viewexamReport'
match '/generateUser' => 'reports#generateUser'
match '/userSubjectwise' => 'reports#userSubjectwise'
match '/generateExamReport' => 'reports#generateExamReport'
match '/departmentReport' => 'reports#departmentReport'
match '/viewDepartmentReport' => 'reports#viewDepartmentReport'
match '/generateDepartmentReport' => 'reports#generateDepartmentReport'
match '/viewDepartmentReportgraph' => 'reports#viewDepartmentReportgraph'
match '/highLevel' => 'reports#highLevel'
match '/reportYear' => 'reports#reportYear'
match '/overall' => 'reports#overall'
match '/specificDepartment' => 'reports#specificDepartment'
match '/departmentDetailed' => 'reports#departmentDetailed'
match '/semesterDetailed' => 'reports#semesterDetailed'
match '/pass_fail' => 'reports#pass_fail'
match '/generatePassfail' => 'reports#generatePassfail'
match '/fetchExam' => 'reports#fetchExam'
match '/listCategories' => 'categories#listCategories'
match '/delete_category' => 'categories#delete_category'
get "questions/index"
get "subjects/index"
# resources :settings
resources :temporary_examinee
#get "temporary_examinee/new"
#get "temporary_examinee/create"
#post "temporary_examinee/create"
#get "user_registration/new"
resources :user_registration
#resources :welcome
get "welcome/index"
get "welcome/admin_dashboard"
get "welcome/examiner_dashboard"
get "welcome/qsetter_dashboard"
get "welcome/examinee_dashboard"
post "welcome/confirm_registration"
get "welcome/confirm_registration"
post "welcome/reject_registration"
get "welcome/reject_registration"
get "welcome/user_management"
get "welcome/workflow"
get "passwords/new"
#get "passwords/forgot"
match 'groupUser' => 'users#groupUser'
match 'createGroup' => 'users#createGroup'
get "user_sessions/new"
get "users/new"
get "users/generate_temporary_password"
post "users/generate_temporary_password"
match 'activate_inactivate' => 'users#activate_inactivate'
match 'activate' => 'users#activate'
match 'inactivate' => 'users#inactivate'
#match 'users/tempexaminee' => 'users#new'
resources :users
get "users/show"
get "users/edit"
get "home/index"
get "user_sessions/new"
resources :user_sessions
match 'login' => "user_sessions#new", :as => :login
match 'logout' => "user_sessions#destroy", :as => :logout
#get "password_resets/new"
resources :password_resets do
member do
get 'confirmEmail'
get 'setPassword'
get 'savePassword'
post 'savePassword'
get 'verifyPassword'
end
end
get "password_resets/edit"
# post "password_resets/edit"
get 'verify/:id' => 'user_verifications#index'
# The priority is based upon order of creation:
# first created -> highest priority.
# Sample of regular route:
# match 'products/:id' => 'catalog#view'
# Keep in mind you can assign values other than :controller and :action
# Sample of named route:
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
# This route can be invoked with purchase_url(:id => product.id)
# Sample resource route (maps HTTP verbs to controller actions automatically):
# resources :products
# Sample resource route with options:
# resources :products do
# member do
# get 'short'
# post 'toggle'
# end
#
# collection do
# get 'sold'
# end
# end
# Sample resource route with sub-resources:
# resources :products do
# resources :comments, :sales
# resource :seller
# end
# Sample resource route with more complex sub-resources
# resources :products do
# resources :comments
# resources :sales do
# get 'recent', :on => :collection
# end
# end
# Sample resource route within a namespace:
# namespace :admin do
# # Directs /admin/products/* to Admin::ProductsController
# # (app/controllers/admin/products_controller.rb)
# resources :products
# end
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
# root :to => "welcome#index"
root :to => 'home#index'
resources :home
# See how all your routes lay out with "rake routes"
# This is a legacy wild controller route that's not recommended for RESTful applications.
# Note: This route will make all actions in every controller accessible via GET requests.
# match ':controller(/:action(/:id(.:format)))'
end
Here is the content of welcome_controller:
=begin
welcome_controller.rb
Description: Controller file for managing the Welcome page of the application
Created on: October 11, 2010
Last modified on: March 18, 2013
Copyright 2013 PIT Solutions Pvt. Ltd. All Rights Reserved.
=end
class WelcomeController < ApplicationController
filter_access_to :all
#layout "home"
layout :choose_layout
def choose_layout
if action_name == 'workflow'
return 'workflow'
else
return 'application'
end
end
def index
end
def workflow
end
def admin_dashboard
#setting = Setting.find(:first)
#pageCollect = params[:pageLength].to_i
if #pageCollect == 0
#pagelength = 10
else
#pagelength = params[:pageLength].to_i
end
if params[:char]
letter = params[:char]
#letter = params[:char]
#registered_examinees = User.where(["is_registered = ? and role_id = ? and is_temp_examinee = ? and name like '#{params[:char]}%'", 1,Examinee,0]).paginate(:page => params[:page], :per_page => #pagelength)
#unapproved_examinees = User.where(["is_registered = ? and confirmed != ? and role_id = ? and is_temp_examinee = ? and name like '#{params[:char]}%'", 1,1,Examinee,0])
else
#registered_examinees = User.where(["is_registered = ?",1]).paginate(:page => params[:page], :per_page => #pagelength)
#unapproved_examinees = User.where(["is_registered = ? and confirmed != ? and role_id = ? and is_temp_examinee = ? and name like '#{params[:char]}%'", 1,1,Examinee,0])
end
end
def examiner_dashboard
end
def qsetter_dashboard
end
def examinee_dashboard
end
def confirm_registration
#all_approved_users = params[:check_examinee]
#all_approved_users.each do|approved|
#user = User.find_by_id(approved.to_i)
#user.update_attributes(:is_approved => 1)
if (#user.is_approved == 0 and #user.confirmed == false) or (#user.is_approved == 1 and #user.confirmed == false) or (#user.is_approved == 2 and #user.confirmed == false)
UserMailer.user_registration_email_confirmation(#user,$pwd).deliver
end
end
flash[:success] = t('flash_success.email_verification')
respond_to do |format|
format.html { redirect_to :back }
format.js
end
end
def reject_registration
#rejected_users = params[:check_examinee]
#rejected_users.each do|rejected|
#user = User.find_by_id(rejected.to_i)
unless (#user.is_approved == 2 and #user.confirmed == false)
#user.update_attributes(:confirmed => false,:is_approved => 2)
UserMailer.examinee_registration_rejection(#user).deliver
end
end
flash[:success] = t('flash_success.email_rejection')
respond_to do |format|
format.html { redirect_to :back }
format.js
end
end
end
Here is the content of admin_dashboard:
<div id="flash_notice" style="display: none;"></div>
<h2><%= t('welcome.filter_examinees')%></h2>
<div class="formContainer">
<table class="formTable" style="border:0px;">
<tr>
<td style="width:auto;" class="lettersort"><%= link_to t('general.all'), :action=>"admin_dashboard"%> | <% for char in 'A'..'Z' %>
<%= link_to( "#{char}", :char=>char, :action=>"admin_dashboard")%>
<%end%></td>
</tr>
</table>
</div>
<%if #setting.examineeApprove == 1%>
<div class="updateStatus">
<%unless #registered_examinees.empty?%>
<div class="qestionhead">
<h3><%= t('welcome.reg_examinees')%></h3>
<%= render :partial=>"users/pageLinks"%>
</div>
<%end%>
<%unless #letter == nil%>
<%= hidden_field_tag "char",#letter%>
<%else%>
<%= hidden_field_tag "char"%>
<%end%>
<div id="examinee_activation">
<%= render 'activation', :collection => #registered_examinees%>
</div>
<br>
</div>
<%else%>
<%= t('user.user_notfound')%>
<%end%>
<script type="text/javascript">
$(document).ready(function() {
$(".pageNum").click(function(){
var data = {pageLength: this.id, char: $("#char").val()};
var url = "<%= url_for(welcome_admin_dashboard_path)%>
";
$.get(url, data)
$(".pageNum").live("click", function(){
var url = "
<%= url_for(welcome_admin_dashboard_path)%>
";
var target = url + "?pageLength=" + this.id + "&char=" + $("#char").val()
$.getScript(target,$("#" + this.id).serialize(),function(data){
});
//$.getScript(this.href,+"?pageLength="+this.id);
return false;
});
});
$("#examinee_activation .pagination a").live("click", function(){
var link = this.href
var lastChar = link.substr(link.length - 1);
if (lastChar == '#'){
return false;
}
else{
$.getScript(this.href);
return false;
}
});
});
</script>
Sorry for including everything. I am very new to this and I'm just trying to run something that was created by others. Any help to fix why I'm getting this error is greatly appreciated.
Related
Hello i know this is common problem but i cant let it work.. I need account activation from email link.. url looks like http://domain.tld/activation/name#domain.tld/d4sa89dsa98 and i want access that parameters from controller :-)
routes.rb
match "activation/:email/:activation_key" => "frontend#activation", :via => :get
frontend_controller.rb
def activation
#user = User.find(:conditions => {:email => params[:email], activation_key => params[:activation_key]})
render "activation"
end
and im getting error
No route matches [GET] "/activation/name#email.tld/a46d4sa8dsa68d"
my activation.html.erb
<% if #user %>
Activation successful.
<% else %>
Activation key is invalid.
<% end %>
EDIT: ---------------------------------------------------------------------------------------------------------------------------
I replaced :email parameter with :id parameter because it look nicer, im not sure if
Array.new(32){Random.new.rand(36).to_s(36)}.join is unique string but that does not matter now.
route
match "activation/:id/:activation_key" => "frontend#activation", :via => :get
rake routes
GET /activation/:id/:activation_key(.:format) frontend#activation
frontend controller
def activation
#user = User.find(:conditions => {:id => params[:id], :activation_key => params[:activation_key]})
render "activation"
end
error
Couldn't find User without an ID
but this WORKS so the problem is in the condition
#user = User.find(params[:id])
SOLUTION
#user = User.find(:first, :conditions => {:id => params[:id], :activation_key => params[:activation_key]})
Have you tried adding a constraints: { email: /[^\/]+/ } to your match argument? Possibly the . gets eaten up by overly greedy regex.
I'm using: Rails 3.1.3, HAML and Passenger
I'm having a route problem in my staging branch, but in the other branch that was merged into staging I have no problem at all. I've tried comparing my routes files and the form files from these two branches using git diff but the two files are the same in the branches.
A weird thing is the rendered error page. Here's a link to an screenshot
Error message
And also the error from passenger:
Rendered time_entries/_form_fields.haml (173.2ms)
Rendered time_entries/_form.haml (194.7ms)
Rendered time_entries/edit.haml within layouts/application (196.6ms)
Completed 500 Internal Server Error in 448ms
ActionView::Template::Error (No route matches {:controller=>"time_entries"}):
5: .field
6: = form.submit "Save"
7: |
8: = link_to "Cancel", project_time_entries_path(#project)
app/views/time_entries/_form.haml:8:in `block in _app_views_time_entries__form_haml__894171410_105032920'
app/views/time_entries/_form.haml:3:in `_app_views_time_entries__form_haml__894171410_105032920'
app/views/time_entries/edit.haml:2:in `_app_views_time_entries_edit_haml__805073897_105087770'
I attach you the code from my route and my form
form.haml
.app-form
= error_messages_for :time_entry
= form_for [#project, #time_entry] do |form|
= render :partial => 'form_fields', :locals => {:form => form}
.field
= form.submit "Save"
|
= link_to "Cancel", project_time_entries_path(#project)
routes.rb
Titi::Application.routes.draw do
root :to => 'time_entries#index'
match 'home' => 'home#index', :as => :home
match '/api/*other' => TitiAPI
resources :projects do
member do
get 'archive'
get 'unarchive'
end
resources :viewers
resources :labels
resources :time_entries do
collection do
get 'start'
end
member do
get 'new_note'
put 'add_note'
end
end
end
resources :bookings
resources :technical_orientations, except: [:delete]
match 'merge_labels/:projects_id' => 'labels#merge_labels', :as => :merge_labels
match 'move_labels/:projects_id' => 'labels#move_labels', :as => :move_labels
resources :time_entries do
collection do
get 'start'
end
member do
get 'new_note'
put 'add_note'
end
end
resources :users do
member do
get 'time_entries'
get 'edit_password'
put 'update_password'
get 'suspend'
get 'unsuspend'
end
new do
get 'invite_form'
post 'invite'
end
collection do
get 'all'
end
end
resources :user_sessions
match 'reports/timesheet' => 'reports#timesheet', :as => :timesheet
match 'reports/:week/timesheet' => 'reports#timesheet', :as => :timesheet_week
match 'reports/timesheet_detail' => 'reports#timesheet_detail', :as => :timesheet_detail
match 'reports/dashboard' => 'reports#dashboard', :as => :dashboard_report
match 'reports/timeentries_irregulars' => 'time_entries_irregulars#timeentries_irregulars', :as => :timeentries_irregulars
match 'reports/:week/timeirregulars' => 'time_entries_irregulars#timeentries_irregulars', :as => :timeirregulars_week
match 'reports/timesheet/admin' => 'reports#timesheet_admin', :as => :timesheet_admin
match 'reports/:week/timesheet/admin' => 'reports#timesheet_admin', :as => :timesheet_admin_week
match 'reports/time_entries' => 'time_entries_reports#landing_report'
match 'reports/time_entries/make' => 'time_entries_reports#index'
match 'reports/time_entries/csv' => 'time_entries_reports#make_csv'
match 'reports/:token' => 'reports#index', :as => :reports
match 'login' => 'user_sessions#new', :as => :login
match 'logout' => 'user_sessions#destroy', :as => :logout
match 'register' => 'users#register', :as => :register
resources :companies do
collection do
get 'settings'
get "remove_photo"
end
end
match 'labels/for_project_id/:id' => 'labels#for_project_id', :as => :for_project_id
match 'holidays_for_company/:token' => 'holidays#public', :as => :public_holiday_for_company
match 'holidays_by_year' => 'holidays#by_year', :as => :holidays_by_year
resources :holidays
resources :clients
resources :invoices do
member do
get 'pdf_invoice'
get 'cancel'
end
resources :invoice_lines do
collection do
get 'add'
end
end
resources :payments
end
resources :tweets do
resource :tweet_likes, :path => 'likes' do
collection do
get 'names'
end
end
end
match 'select_invoices' => 'invoices#select_invoices', :as => :select_invoices
match 'pusher/auth' => 'pusher#auth'
resources :requests, :only=>[:create]
match '*request', :controller => 'requests', :action => 'options', :constraints => {:method => 'OPTIONS', :format => 'json'}
end
Thank's in advance.
On app/views/time_entries/_form.haml:8, does #project exist? Perhaps your staging branch uses a different database and hence the #project you think is there is not?
Also, run rake routes and verify the project_time_entries is in the output. Perhaps you need a :as on one of your routes.
I have in my haml:
= link_to("Calls Today", todo_path)
And in my routes.rb:
match "todo/today" => "todo#show_date"
match "todo/today/campaign/:id" => "todo#show_date", :as => "todo"
My understanding is that 'todo_path' should find todo controller and show_date.
This route :
match "todo/today/campaign/:id" => "todo#show_date", :as => "todo"
Expects an id parameter. Therefore, your link_to should be like :
= link_to("Calls Today", todo_path(:id => your_id))
I want to route requests something like this: reports/bloodtypes is routed to controller reports, action bloodtypes, with format = pdf, and the route named as bloodtype_report. The Guides gives an example
match 'photos/:id' => 'photos#show', :defaults => { :format => 'jpg' }
When I do this:
match 'reports/bloodtypes' => 'reports#bloodtypes', :defaults => {:format => 'pdf'}, :as => 'bloodtype_report'
or this
match 'reports/bloodtypes' => 'reports#bloodtypes', :format => 'pdf', :as => 'bloodtype_report'
the controller still does not receive the :format => 'pdf' in params, and tries to render the report as HTML. The funny thing is that the route is shown by Rake as
bloodtype_report : /reports/bloodtypes(.:format) : {:format=>"pdf", :controller=>"reports", :action=>"bloodtypes"}
whether I use the first form (with :default) or second (just setting the format to pdf). It seems the route is correct, so why is the format parameter not being passed to the controller?
have you tried adding this to your controller:
respond_to do |format|
format.html
format.pdf { render :pdf => "show" }
end
I am doing this in config/initializer/devise.rb using rails3 rc and ruby 1.9.2rc
config.warden do |manager|
manager.oauth(:twitter) do |twitter|
twitter.consumer_secret = "...key....."
twitter.consumer_key = ".....app_key......"
twitter.options :site => 'http://twitter.com'
end
# manager.default_strategies(:scope => :user).unshift :twitter_oauth
Warden::OAuth.access_token_user_finder(:twitter) do |access_token|
user = User.find_by_access_token_and_access_secret(access_token.token, access_token.secret)
user ||= User.create(:access_token => access_token.token, :secret => access_token.secret)
end
end
#Warden::OAuth.access_token_user_finder(:twitter) do |access_token|
# User.find_or_create_by(:token => access_token.token, :secret => access_token.secret).tap
# end
config.oauth :github, '....app_key...', '...secret........',
:site => 'https://github.com/',
:authorize_path => 'login/oauth/authorize',
:access_token_path => 'login/oauth/access_token',
:scope => %w(user public_repo)
config.oauth :facebook, '..app_key....', '..secret........',
:site => 'https://graph.facebook.com',
:authorize_path => 'login/oauth/authorize',
:access_token_path => 'login/oauth/access_token'
when i click on link created in sing_in form its go to face or twitter or github but show message page not found , or url not exist what should be the problem