Bratish Goswami

Personal website and blog

Common Development Environment Issues

Running into various setup issues while getting my development environment configured properly. Documenting some solutions I've found for common problems.

Path Issues

One recurring issue is executables not being found in the PATH. This happens a lot with:

  • Node.js/npm installations
  • Ruby gems
  • Python packages
  • Custom scripts

Solution

Always check your PATH:

echo $PATH

And add directories as needed in your .bashrc or .bash_profile:

export PATH="/usr/local/bin:$PATH"

Permission Problems

Getting permission denied errors, especially on Linux/Mac systems.

Common Fixes

For npm:

sudo chown -R $(whoami) ~/.npm

For general file permissions:

chmod 755 filename
chmod +x script.sh

Port Conflicts

Development servers failing to start due to port conflicts.

Quick Check

See what's using a port:

lsof -i :3000
netstat -tulpn | grep :3000

Solutions

  • Kill the process: kill -9 PID
  • Use a different port: --port 3001
  • Stop other services: sudo service apache2 stop

Git Configuration

Fresh git installations need proper configuration:

git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"

SSH Key Setup

For GitHub, Heroku, and other services:

ssh-keygen -t rsa -C "your.email@example.com"
cat ~/.ssh/id_rsa.pub

Then copy the public key to the respective service.

Package Manager Issues

Ubuntu/Debian

sudo apt-get update
sudo apt-get upgrade

Mac (with Homebrew)

brew update
brew upgrade

Environment Variables

Keep configuration in environment variables:

export DATABASE_URL="postgresql://..."
export API_KEY="your-secret-key"

For persistence, add to .bashrc or create a .env file.

Debugging Tips

Most development environment issues are variations of the same problems: permissions, paths, ports, and configuration. Having a mental checklist helps solve them faster.

  1. Read error messages carefully - they often contain the solution
  2. Check logs - tail -f log/development.log
  3. Use verbose flags - -v or --verbose
  4. Google the exact error message
  5. Check Stack Overflow - usually someone has hit the same issue