I'm trying to use Linkedin's api for authentication in my rails app. I'm pretty new to rails so I followed this guide http://sourcey.com/rails-4-omniauth-using-devise-with-twitter-facebook-and-linkedin/
I've tried to run rake db:migrate but get this error. The full trace is below. I've also added the environment.rb file as I think that's where the problem is but I'm not sure. Also, if anyone has a better guide for using linkedin apis with rails please share! Thanks for the help!
rake aborted!
NameError: undefined local variable or method config' for main:Object
/Users/alexanderkehaya/Desktop/codea/codea_app/config/environment.rb:4:in
'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in require'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in
block in require'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in load_dependency'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in
require'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/railties-4.1.5/lib/rails/application.rb:276:in require_environment!'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/railties-4.1.5/lib/rails/application.rb:379:in
block in run_tasks_blocks'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:240:in call'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:240:in
block in execute'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:235:in each'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:235:in
execute'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:179:in block in invoke_with_call_chain'
/Users/alexanderkehaya/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in
mon_synchronize'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:172:in invoke_with_call_chain'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:201:in
block in invoke_prerequisites'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:199:in each'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:199:in
invoke_prerequisites'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:178:in block in invoke_with_call_chain'
/Users/alexanderkehaya/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in
mon_synchronize'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:172:in invoke_with_call_chain'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/task.rb:165:in
invoke'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:150:in invoke_task'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in
block (2 levels) in top_level'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in each'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:106:in
block in top_level'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:115:in run_with_threads'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:100:in
top_level'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:78:in block in run'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:176:in
standard_exception_handling'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/lib/rake/application.rb:75:in run'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/gems/rake-10.3.2/bin/rake:33:in
'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/bin/rake:23:in load'
/Users/alexanderkehaya/.rvm/gems/ruby-2.1.2/bin/rake:23:in
'
Tasks: TOP => db:migrate => environment
environemnt.rb file
require File.expand_path('../application', __FILE__)
config.app_domain = 'somedoamin.com'
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.default_url_options = { host: config.app_domain }
config.action_mailer.smtp_settings = {
address: 'smtp.gmail.com',
port: '587',
enable_starttls_auto: true,
user_name: 'someuser',
password: 'somepass',
authentication: :plain,
domain: 'somedomain.com'
}
Rails.application.initialize!