Error occurs when trying to install Homebrew on a Mac for Ruby on Rails
I have solved this issue. It was a whitespace issue in my application.yml file. I did not format this file correctly as YAML is whitespace sensitive unlike Ruby. Once the file was formatted using tabs or double spaces the rails server worked again.
First time homebrew installation failure
delete this file
/usr/local/Homebrew/.git/refs/remotes/origin/master.lock
try
rm -f /usr/local/Homebrew/.git/refs/remotes/origin/master.lock
and then try again
Installing Rails on Mac OS fails with several errors
Run this command first
sudo chown -R <your username>:admin /usr/local
Replace <your username>
with whatever your username on your mac is. So, in my case, I would run
sudo chown -R Adrian:admin /usr/local
Then try installing rbenv and ruby-build.
Your problem is most likely caused by the use of package installers (.pkg files) as they tend to create files as root in places where they shouldn't.
Note: you can find out your username by running whoami
Brew update errors
There's another good guide here that covers more of the pre-requisites.
http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/
Having issues Installing postgresql with homebrew
It appears the URL has changed but the formula hasn't been updated yet.
The formula has now been updated. Instead of manually fixing
the recipe as the rest of this answer suggests, just update your
homebrew recipes viabrew update
and try the install again.
You can edit the formula yourself with the brew edit postgresql
command. Change the url
to http://ftp.postgresql.org/pub/source/v9.1.1/postgresql-9.1.1.tar.bz2
and try to install again.
Error installing Rails on Macbook Air OS 10.9
I followed the steps in the blog post below and I finally got rails working on my 2012 MacBook Air running Maverick(10.9.4).
http://www.createdbypete.com/articles/ruby-on-rails-development-setup-for-mac-osx/
Though probably overkill, I reloaded Terminal after I entered each line.
Now when I type:
$gem -v
I get
2.0.3
and if I type
$ruby -v
I get
ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]
And finally, when I type
$rails -v
I get
Rails 4.1.4
:)
Related Topics
Rails Activerecord: Saving Nested Models Is Rolled Back
Check If String Is Repetition of an Unknown Substring
Error When Pushing to Heroku - ...Appear in Group - Ruby on Rails
Devise 'Find_First_By_Auth_Conditions' Method Explanation
Metasploit Induction of Bundle and Rake
Ruby: How to Dynamically Replace Parameters in Native Pg Gem
Ruby Parallel Assignment, Step Question
How to Find the Average of 3 Date in Ruby on Rails or Ruby
Recurring Billing with Rails and Activemerchant: Best Practices, Pitfalls, Gotchas
Rails 3 + Daemons Gem: Exception When Querying Model
Adding Nested Attributes to Devise User Model
Ruby Implementation Win32API Get Mouse Scroll/Wheel Input
How to Use Link_To with Ajax in Rails 3.2.1