Skip to content

Instantly share code, notes, and snippets.

View adamdilek's full-sized avatar
🎯
focusing

Adam Dilek adamdilek

🎯
focusing
View GitHub Profile
@adamdilek
adamdilek / KebabChecker.php
Created October 13, 2011 13:39 — forked from lab2023/KebabChecker.php
KebabChecker
<?php
/**
* Created by JetBrains PhpStorm.
* User: Muhammet
* Date: 19.10.2011
* Time: 05:47
* To change this template use File | Settings | File Templates.
*/
// Version.php
@adamdilek
adamdilek / database.yml
Created October 26, 2011 07:40
database.yml
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MYSQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
@adamdilek
adamdilek / error
Created October 27, 2011 20:29
DEPRECATION WARNING
DEPRECATION WARNING: Arel::Visitors::VISITORS is deprecated and will be removed.
Database adapters should define a visitor_for method which returns the appropri
ate visitor for the database. For example, MysqlAdapter.visitor_for(pool) return
s Arel::Visitors::MySQL.new(pool). (called from mon_synchronize at C:/RailsInsta
ller/Ruby1.9.2/lib/ruby/1.9.1/monitor.rb:201)
@adamdilek
adamdilek / routes
Created November 27, 2011 16:04
routes configuration
WebSer::Application.routes.draw do
get "universities/index"
get "universities/list"
get "address/index"
get "address/provinces"
get "address/counties"
@adamdilek
adamdilek / routes
Created November 27, 2011 22:31
routes
WebSer::Application.routes.draw do
devise_for :users
get "universities/index"
get "universities/list"
get "address/index"
get "address/provinces"
@adamdilek
adamdilek / rroutes
Created November 27, 2011 22:40
rake routes
c:\Sites\web-ser>rake routes
new_user_session GET /users/sign_in(.:format) {:acti
on=>"new", :controller=>"devise/sessions"}
user_session POST /users/sign_in(.:format) {:acti
on=>"create", :controller=>"devise/sessions"}
destroy_user_session DELETE /users/sign_out(.:format) {:acti
on=>"destroy", :controller=>"devise/sessions"}
user_password POST /users/password(.:format) {:acti
on=>"create", :controller=>"devise/passwords"}
new_user_password GET /users/password/new(.:format) {:acti
class Services::AddressController < ApplicationController
respond_to :html, :xml, :json
def index
end
def provinces
@provinces=Province.all
respond_with(@provinces)
end
@adamdilek
adamdilek / adress.rb
Created November 29, 2011 22:20
Adress
class Services::AddressController < ApplicationController
respond_to :html, :xml, :json
def index
end
def provinces
@provinces=Province.all
respond_with(@provinces)
end
@adamdilek
adamdilek / mysql
Created December 6, 2011 23:59
error mysql
C:\Sites\bitecek2>rails g model student
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.rb:2:in `require': Incorrect MySQL client library version! This
gem was compiled for 6.0.0 but the client library is 5.5.13. (RuntimeError)
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-
x86-mingw32/lib/mysql2/mysql2.rb:2:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-ingw32/lib/mysql2.rb:9:in `require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-ingw32/lib/mysql2.rb:9:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in `require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtim
@adamdilek
adamdilek / gem
Created December 8, 2011 09:44
gemfile
source 'http://rubygems.org'
gem 'rails', '3.1.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2'
gem 'devise'