Find which process is listening on PORT 4000
Use the following: lsof -i :4000 To kill the process use kill -9 PID
Use the following: lsof -i :4000 To kill the process use kill -9 PID
To add a folder to your PATH, add the following to your bash config: export PATH="$PATH:/foo/bar" To check what is on your path, run: echo $PATH
weekly_meters.each do |week, meters| puts "#{week}: #{meters}" end
# create hash my_dict = { "apples" => 3, "pears" => 2 } # check if a key exists puts my_dict.has_key?("apples") # true puts my_dict.has_key?("oranges") # false Sources ruby docs