This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@spandan:/opt/Rails-project-For-Student-Forum# heroku run rake db:migrate | |
Running rake db:migrate attached to terminal... up, run.5 | |
rake aborted! | |
Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (can't activate pg (~> 0.11, runtime), already activated pg-0.10.0. Make sure all dependencies are added to Gemfile.) | |
Tasks: TOP => db:migrate => db:load_config | |
(See full trace by running task with --trace) | |
root@spandan:/opt/Rails-project-For-Student-Forum# | |
How to Solve this error ? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def match_package(str) | |
str.match /package\s.*;/ | |
end | |
def match_import(str) | |
str.match /import\s.*;/ | |
end | |
def match_class(str) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def match_package(str) | |
str.match(/package\s.*;/) | |
end | |
def match_import(str) | |
str.match(/import\s.*;/) | |
end | |
def match_class(str) | |
str.match(/class\s*[A-Z]\w*/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Authorizations | |
# Uncomment out the merging for each enviornment that you'd like to include. | |
# You can also just copy and paste the tree (do not include the "authorizations") to each | |
# enviornment if you need something different per enviornment. | |
authorizations: &AUTHORIZATIONS | |
group_base: dc=corp, dc=xyz, dc=net | |
## Requires config.ldap_check_group_membership in devise.rb be true | |
# Can have multiple values, must match all to be authorized | |
required_groups: | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Authorizations | |
# Uncomment out the merging for each enviornment that you'd like to include. | |
# You can also just copy and paste the tree (do not include the "authorizations") to each | |
# enviornment if you need something different per enviornment. | |
authorizations: &AUTHORIZATIONS | |
group_base: dc=corp, dc=xyz, dc=net | |
## Requires config.ldap_check_group_membership in devise.rb be true | |
# Can have multiple values, must match all to be authorized | |
required_groups: | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use this hook to configure devise mailer, warden hooks and so forth. | |
# Many of these configuration options can be set straight in your model. | |
Devise.setup do |config| | |
# ==> LDAP Configuration | |
config.ldap_logger = true | |
config.ldap_create_user = true | |
# config.ldap_update_password = true | |
#config.ldap_config = "#{Rails.root}/config/ldap.yml" | |
config.ldap_check_group_membership = true | |
# config.ldap_check_attributes = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
until STDIN.eof? | |
puts gets.scan(/\w+/).length | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Authorizations | |
# Uncomment out the merging for each enviornment that you'd like to include. | |
# You can also just copy and paste the tree (do not include the "authorizations") to each | |
# enviornment if you need something different per enviornment. | |
authorizations: &AUTHORIZATIONS | |
#group_base: dc=corp, dc=betterlabs, dc=net | |
## Requires config.ldap_check_group_membership in devise.rb be true | |
# Can have multiple values, must match all to be authorized | |
#required_groups: | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Devise.rb | |
Devise.setup do |config| | |
# ==> LDAP Configuration | |
config.ldap_logger = true | |
config.ldap_create_user = true | |
#config.ldap_update_password = true | |
#config.ldap_config = "#{Rails.root}/config/ldap.yml" | |
#config.ldap_check_group_membership = true | |
config.ldap_check_attributes = true | |
config.ldap_use_admin_to_bind = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Email < ActiveRecord::Base | |
scope :by_account, -> account_id { where(account_id: account_id) } | |
attr_accessible :template_name, :subject, :content, :user_id, :account_id | |
validates :subject, presence: true | |
validates :template_name, presence: true | |
validates :template_name, uniqueness: { :scope => :account_id } | |
validates :content, presence: true |
OlderNewer