changed $base_url to ENV['base_url']