Question

I have a simple login system where I have used authentication using devise gem and i am deployed on the server and testing using lynx browser I followed all the steps related to the devise. I have set my root page as devise login page so my route.rb is as follows

devise_for :users      
  devise_scope :user do
    root :to => "devise/sessions#new"
  end    
  resources :home,:only => [:index, :dashboard]
  resources :device_info,:only => [:address_list]     
  match ':controller(/:action(/:id))(.:format)'

my database is connected using RDS my database.yml file is as

development:
  adapter: mysql2
  encoding: utf8
  reconnect: true
  database: abc
  pool: 5
  username: root
  password: root
  port: 3306
  host: 127.0.0.1

test:
  adapter: mysql2
  encoding: utf8
  reconnect: true
  database: abc
  pool: 5
  username: root
  password: root
  port: 3306
  host: 127.0.0.1

production:
  adapter: mysql2
  encoding: utf8
  reconnect: true
  database: abc
  pool: 5
  username: root
  password: root
  port: 3306
  host: xxxxxxxxxx.xxx.amazonaws.com

when i start server and enter the address as lynx 0.0.0.0:3000 it gives me error as

Looking up 0.0.0.0 first
Looking up 0.0.0.0:3000
Making HTTP connection to 0.0.0.0:3000
Sending HTTP request.
HTTP request sent; waiting for response.
Alert!: Unexpected network read error; connection aborted.
Can't Access `http://0.0.0.0:3000/'
Alert!: Unable to access document.    
lynx: Can't access startfile 

First i think this may be due to database not connecting to application but by using rails console i can access the database.I also checked my log file it will not showing any error. did I miss something.

Here I am using rails 3.2.11 and ruby 1.8.7

What should I do?

Was it helpful?

Solution

I have a same situation. This is beacuse you don't have access for port 3000. You will have to open port 3000 in the iptable. you can use iptables -I INPUT 1 -p tcp --dport 3000 -j ACCEPT command for opening port in iptable.

Also you can refer following links

https://help.ubuntu.com/community/IptablesHowTo

http://www.cyberciti.biz/tips/linux-iptables-examples.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top