Ruby on Rails: Switch from test_unit to rspec

In your config/application.rb file : config.generators do |g| g.test_framework :rspec end Now when you run your generators (example rails generate scaffold post), you get rspec test files. Remember to restart your server. For more information on generators see: RailsCasts #216 Generators in Rails 3 If you really want to use the integration_test generator you’ll need … Read more

Getting the warning “Insecure world writable dir /home/chance ” in PATH, mode 040777 for rails and gem

If you tried sudo chmod go-w /usr/local/bin from the other answer, try: chmod go-w /home/chance instead. What seems to have happened is that somehow your home directory (/home/chance) has been added to your $PATH (the list of directories the OS searches when trying to find an executable to launch) and has also had its permissions … Read more

“gem install therubyracer -v ‘0.10.2’” on osx mavericks not installing

If you decide to use a newer therubyracer gem version, you will no longer have this problem Otherwise: brew tap homebrew/dupes # Thanks Tom brew install apple-gcc42 export CC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 export CXX=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2 export CPP=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/cpp-4.2 brew uninstall v8 gem uninstall libv8 gem install therubyracer -v ‘0.10.2’ # specify version

gem install permission problem

Try setting GEM_HOME and GEM_PATH to ~/.gem, For the current terminal session, just type: export GEM_HOME=~/.gem export GEM_PATH=~/.gem If you want these to be set whenever you open a terminal, add the above commands to your ~/.bashrc file. For a more comprehensive solution to setting up a custom ruby environment, see this tutorial from Site5KB, … Read more