- sudo add-apt-repository ppa:git-core/ppa
- sudo apt-get update
- sudo apt-get install git
Notes from stackoverflow. This works.
export PATH=$PATH:/usr/local/mongodb/bin
For Mongodb 2.0.3
mongod --dbpath /Users/bparanj/data/mongodb
The dbpath is the path to the mongodb.config file
which contains :
dbpath=/Users/bparanj/data/mongodb
sudo aptitude install ruby1.8-dev ruby1.8 irb1.8 libreadline-ruby1.8 libruby1.8 libopenssl
sudo ln -s /usr/bin/irb1.8 /usr/bin/irb
sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby
Check the Ruby version :
ruby -v
sudo apt-get install mysql-server mysql-client sudo apt-get install libmysql-ruby libmysqlclient-dev sudo gem install mysql
Install mysql database connector by running the above commands.
sudo apt-get install libxslt-dev libxml2-dev
I was getting this error : Permissions 0644 for '/home/bparanj/Downloads/my-file.ssh' are too open. when I was ssh ing into a box.
Solution:
sudo chmod 600 your-private-key.ssh
# app/controllers/widget_controller.rb
...
def index
cookies[:expiring_cookie] = { :value => 'All that we see or seem...',
:expires => 1.hour.from_now }
end
...
# spec/controllers/widget_controller_spec.rb
...
it "sets the cookie" do
get :index
response.cookies['expiring_cookie'].should eq('All that we see or seem...')
# is but a dream within a dream.
# - Edgar Allan Poe
end
it "sets the cookie expiration" do
stub_cookie_jar = HashWithIndifferentAccess.new
controller.stub(:cookies) { stub_cookie_jar }
get :index
expiring_cookie = stub_cookie_jar['expiring_cookie']
expiring_cookie[:expires].to_i.should be_within(1).of(1.hour.from_now.to_i)
end