atul jha

koolhead17

Menu Close

Tag: Lucid

2 minutes guide to getting started with Launchpad/Bazaar via Lucid Ubuntu 10.04

I just added some contents from allready existing 5 minutes guide to make it 2 mins and work on Lucid. 🙂

Before i start you need to have 2 things allready done,
1. $ apt-get install bzr
2. A launchpad account.
3. Your public key submitted at launchpad.
It means create a key is you don`t have allready
$ ssh-keygen -t rsa

you will see in /home//.ssh/rsa.pub created paste its content there.

4. bzr lp-login john.doe  <replace it with your username>

Adding your own info

$ bzr whoami "John Doe <john.doe@gmail.com>"

You can check what identity is stored in Bazaar’s configuration:

$ bzr whoami
john.doe

Starting New project

bzr init-repo myproject
cd myproject
bzr init trunk
cd trunk

Adding Files

bzr add hello.txt

and then commit, which saves a snapshot of all versioned files:

bzr commit -m “Added first line of text”

Pushing your branch on Launchpad

Replace john doe with your username.

bzr push bzr+ssh://bazaar.launchpad.net/~john.doe/+junk/myproject
your done.
Pushing the changes in existing branch.
bzr push


Original post :- http://doc.bazaar.canonical.com/latest/en/mini-tutorial/
thanks @jelmet on #juju helping me.


		
		

Moved to Lucid !!

All this while since 2008 i was happily using Hardy on my laptop but since the official support is getting over soon i preferred reinstalling from fresh. I was thinking to install 10.10 but today only i came to know that my CD drive is nomore. Thanks to USB boot, i managed to have get Lucid working on my ACER 5920 laptop.

The only place where i was stuck at is the mic was not working after googling i came to know that my Codec: Realtek ALC1200 and solution to that is adding 2 lines in my alsa config file.

$sudo nano /etc/modprobe.d/alsa-base.conf

options snd-hda-intel probe_mask=1
options snd-hda-intel model=auto

Restarting ALSA (sudo alsa force-reload) and also checking alsamixture 2 confirm if mic in muted.

Running your first Ruby on rails application (hello world), on Ubuntu Lucid.

1.Installing Ruby and Ruby on Rails.

$ sudo apt-get install ruby rails

2.Creating first application running on WEBrick server.

      $ rails test
      create  
      create  app/controllers
      create  app/helpers
      create  app/models
      create  app/views/layouts 
      create  config/environments
      create  config/initializers
      create  config/locales
      create  db
      create  doc
      create  lib
      create  lib/tasks
      create  log
      create  public/images
      create  public/javascripts
      create  public/stylesheets
      create  script/performance
      create  test/fixtures
      create  test/functional
      create  test/integration
      create  test/performance
      create  test/unit
      create  vendor
      create  vendor/plugins
      create  tmp/sessions
      create  tmp/sockets
      create  tmp/cache
      create  tmp/pids
      create  Rakefile
      create  README
      create  app/controllers/application_controller.rb
      create  app/helpers/application_helper.rb
      create  config/database.yml
      create  config/routes.rb
      create  config/locales/en.yml
      create  db/seeds.rb
      create  config/initializers/backtrace_silencers.rb
      create  config/initializers/inflections.rb
      create  config/initializers/mime_types.rb
      create  config/initializers/new_rails_defaults.rb
      create  config/initializers/session_store.rb
      create  config/initializers/cookie_verification_secret.rb
      create  config/environment.rb
      create  config/boot.rb
      create  config/environments/production.rb
      create  config/environments/development.rb
      create  config/environments/test.rb
      create  script/about
      create  script/console
      create  script/dbconsole
      create  script/destroy
      create  script/generate
      create  script/runner
      create  script/server
      create  script/plugin
      create  script/performance/benchmarker
      create  script/performance/profiler
      create  test/test_helper.rb
      create  test/performance/browsing_test.rb
      create  public/404.html
      create  public/422.html
      create  public/500.html
      create  public/index.html
      create  public/favicon.ico
      create  public/robots.txt
      create  public/images/rails.png
      create  public/javascripts/prototype.js
      create  public/javascripts/effects.js
      create  public/javascripts/dragdrop.js
      create  public/javascripts/controls.js
      create  public/javascripts/application.js
      create  doc/README_FOR_APP
      create  log/server.log
      create  log/production.log
      create  log/development.log
      create  log/test.log

3.Configure WEBrick (Ruby’s server)

$cd test
$ ruby script/server
 
=> Booting WEBrick
=> Rails 2.3.8 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2010-08-02 12:40:40] INFO  WEBrick 1.3.1
[2010-08-02 12:40:40] INFO  ruby 1.8.7 (2010-01-10) [i486-linux]
[2010-08-02 12:40:45] INFO  WEBrick::HTTPServer#start: pid=27681 port=3000

To test your ROR configure paste http://0.0.0.0:3000 on your browser.

4.Creating a Controller, I call it hello.

$ ruby script/generate controller hello
      exists  app/controllers/
      exists  app/helpers/
      create  app/views/hello
      exists  test/functional/
      create  test/unit/helpers/
      create  app/controllers/hello_controller.rb
      create  test/functional/hello_controller_test.rb
      create  app/helpers/hello_helper.rb
      create  test/unit/helpers/hello_helper_test.rb

5.Creating an action, I call it hi.

In the file app/controllers/hello_controller.rb, i have added action “hi”

 
class HelloController < ApplicationController
 
  def hi
  end
 
end

6.Creating view for the action “hi”

 $ vim app/views/hello/hi.html.erb
 
<html>
<body> Hello World!!</body>
</html>

Lets test our page again.( Am sure the WEBrick server still running)

on browser paste this –> http://0.0.0.0:3000/hello/hi and you can see your first ROR application in front of you.

© 2017 atul jha. All rights reserved.

Theme by Anders Norén.