0

I recently switched my development platform from windows 7 to Linux (Debian), i copied entire app directory to Linux, now when i do git status it is showing a list of modified files, while on windows there was nothing to commit status. when i do git diff it looks like there is no change in file content it is just showing all the lines removed (-) and after that exact lines added (+). Another issue is that the app is running file on port 3000 by rails s but when i tried to run it on port 80 by rails s -p 80 i get following error :

=> Booting Thin
=> Rails 4.1.5 application starting in development on 0.0.0.0:80
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
>> Thin web server (v1.3.1 codename Triple Espresso)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:80, CTRL+C to stop
Exiting
/usr/lib/ruby/vendor_ruby/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)

I have checked that port 80 is free(apache2 was running on it and i killed it) so it should be permission issue as error told (port is in use or requires root privileges), so i again run rails server with sudo:

sudo rails s -p 80

This time i get following error:

git://github.com/bogdan/datagrid.git (at master) is not yet checked out. Run `bundle install` first.

i did bundle install and run above rails server command again but still getting same error.

Amit Singh
  • 134
  • 12

2 Answers2

0

If it is not an issue for you and the server starts in port 3000, I would suggest you to use that port without using sudo.

Usually when you go against conventions you drive into strange problems, as for instance, having to run the rails command as root, running into other strange problems as the one you are describing.

You are changing your development environment, make it at least at the beginning the least painful for you and follow the development conventions, which is to work in port 3000.

Fer
  • 3,247
  • 1
  • 22
  • 33
0

a) git reporting modified files - can be related to the windows newline \n\r while unix expects just a \n. You can try this.

b) As @fer suggested, try using the conventional ports, 3000, 3001, 30xx. They are less likely to clash with something else.

c) Possible issue with the gem or bundler version.

Community
  • 1
  • 1
roob
  • 1,116
  • 7
  • 11