Monday, 15 February 2016

Install Apache2 from source in $HOME directory without root access

1. Download apache2 from source website.
2. Unzip
3. Make installation directory inside $HOME, i made "install" directory in my case.
4. Go inside the apache unzip directory
5. Run command ./configure --prefix=@HOME/path-to-install-directory.
6. make
7. make install
8. Then start apache by $HOME/path-to-install-directory/bin/apachectl start
          In my case it throws the following error:
          httpd: Could not reliably determine the server's fully qualified domain name, using               for ServerName
          (13)Permission denied: make_sock: could not bind to address [::]:80
          (13)Permission denied: make_sock: could not bind to address
          no listening sockets available, shutting down
          Unable to open logs
         So error given below is removed by changing the nameserver to localhost     
         httpd: Could not reliably determine the server's fully qualified domain name, using               for ServerName
         In my case i added ServerName localhost:80  in $HOME/path-to-install-                   directory/conf/httpd.conf 

          and again start apache by the command in step 8 the upper error disappeared but the remaining           was there. 

         so i get some ideas from this link 

         and made the following changes :  
                 I just add Listen 1025 in   $HOME/path-to-install-directory/conf/httpd.conf  file instead of 
                 Listen 80  and again start apache, this time it starts with no error.

Sunday, 3 January 2016

Error on upgrading the librehatti from Django1.7 to Django1.8 with Pyhton3.4

$ mysql -u root -p librehatti < librehatti.sql

         |-ERROR 1452 (23000) at line 41792: Cannot add or update a child row: a foreign key constraint fails (`librehatti`.`#sql-3f6_f5`, CONSTRAINT `bills_quoteditem_ibfk_2` FOREIGN KEY (`item_id`) REFERENCES `catalog_product` (`id`))

$ python syncdb

        |- File "/home/aasp/LibreHatti/src/useraccounts/", line 80
           return unicode(self.user)
           TabError: inconsistent use of tabs and spaces in indentation


$ python syncdb         
             |- File "/home/aasp/LibreHatti/src/librehatti/suspense/", line 9, in <module>
                from librehatti.suspense.forms import StaffForm
                File "/home/aasp/LibreHatti/src/librehatti/suspense/", line 3, in <module>
                from models import SuspenseClearance
                ImportError: No module named 'models'

Then use

$ python migrate           
              |- and the same error as above

          >> so make changes in LibreHatti/src/librehatti/suspense/ {in this case, "from .models import whatever" in stead of "from models import whatever"}

$ python runserver

           |- ImportError at /
               No module named 'reports'
             >>{in this case, "from .models import whatever" in stead of "from models import whatever"}
           |- File "/home/aasp/LibreHatti/src/librehatti/", line 6, in <module>
              from .reports.register_generator import GenerateRegister
              File "/home/aasp/LibreHatti/src/librehatti/reports/", line 13, in                              <module>
              from helper import get_query
              ImportError: No module named 'helper'
             >>same chages as above in,, and

           |- 'module' object has no attribute 'izip'
             >> replace "izip" with "zip_longest"

            |- File "/home/aasp/LibreHatti/src/librehatti/suspense/", line 5, in <module>
               from models import SuspenseClearance
               ImportError: No module named 'models'
              >>{in this case, "from .models import whatever" in stead of "from models import whatever"}

             |- File "/home/aasp/LibreHatti/src/librehatti/reports/", line 5, in <module>
                from forms import ClientForm
                ImportError: No module named 'forms'
              >>{in this case, "from .models import whatever" in stead of "from models import whatever"}

               |- File "/home/aasp/.virtualenvs/py3/lib/python3.4/site-packages/django/core/", line 102, in get_callable lookup_view)
                  ImportError: Could not import 'quoted_bill'. The path must be fully qualified.
                   >> Commented the line url(r'^quoted_bill/', 'librehatti.prints.views.quoted_bill'), in

Friday, 25 September 2015

Silly mistakes "Task 'saas' is not in your gulpfile" deploying sass with ionic framework

Here is the log of discussion on IRC

I am deploying ionic on ubuntu machine, i found an error with gulp
$ gulp saas
$ gulp saas
[12:06:36] Using gulpfile ~/myApp/gulpfile.js
[12:06:36] Task 'saas' is not in your gulpfile
[12:06:36] Please check the documentation for proper gulpfile formatting
yea this is with deploying to ios, like I said, Android is fine and still is working.
junmin has joined
it's either a problem with ionic, ios or cordova, but if anyone else serious is making interesting apps they know exactly what I'm talking about.
it's super aggravating.
← junmin has quit (Ping timeout: 240 seconds)
satinder. in your gulpfile, you need some lines that look somewhat like this:
gulp.task('saas', function() {
that's assuming you want to run a 'saas' task. (you maybe meant 'sass')
otherwise, just type 'gulp' as your command, and the 'default' task should run
joeco: yes it is there
gulp.task('default', ['sass']);
gulp.task('sass', function(done) {
that is not defining a new task. It is saying whatever is in the brackets is a dependency of 'default'
it is already present there
it means anything in the brackets has to resolve before 'default' is run.
so if you don't want sass, just erase it from the brackets
or else make a new .task() with 'sass' as the main name / definition
← dan2k3k4 has quit (Ping timeout: 246 seconds)
oh I see, you have one there
maybe it needs to be listed above the 'default'? just a guess
ok i am trying that way
are you sure the 'sass' task has something like this as the last line: .on('end', done);
ilmgb has joined
you have to call the 'done' so that it knows to start the next task
gulp.task('sass', function(done) {
errLogToConsole: true
keepSpecialComments: 0
.pipe(rename({ extname: '.min.css' }))
.on('end', done);
but still not working
qwebirc95493 has joined
well I don't know. but one other thing you can try, a really handy and simple/straightforward plugin is run-sequence on npm
i use it. you may restructure your order of gulp tasks, the sequence they run in.
maybe going threough that exercise will reveal why the 'sass' task is messed up.
okay, i will try that ,,,
It's OK, you're connected again :)
*** Looking up your hostname...
*** Checking Ident
*** Couldn't look up your hostname
*** Got Ident response
*** Spoofing your IP
← qwebirc95493 has quit (Ping timeout: 246 seconds)
← blackjid has quit (Ping timeout: 240 seconds)
satinder, I think I know the real solution
can you check your ionic.project file?
under gulpstartuptasks: [] ... you have a misspelling.
← mickhansen has quit (Ping timeout: 240 seconds)
joeco: Which file
it should be in the root of your project
it is the startup file that is called when you do "ionic run android" or whichever
from there it calls gulpfile.js
yes it is there
"name": "myApp",
"app_id": "",
"gulpStartupTasks": [
"watchPatterns": [
this is the content of ionic.project file
mickhansen has joined
hmm.. that's strange. the "sass" matches the "sass" in your gulpfile
so I don't know why it said: Task 'saas' is not in your gulpfile
how about in your "watch" task, back in the gulpfile?
does it depend on "saas"?
no i don't think so
aasp@1313:~/myApp$ gulp watch
[12:33:25] Using gulpfile ~/myApp/gulpfile.js
[12:33:25] Starting 'watch'...
[12:33:25] Finished 'watch' after 11 ms
dan2k3k4 has joined
Actually i am not using the default sass files of the ionic project
wait, your original command you typed was "gulp saas"
that's why
what if you type "gulp sass"
yes it works!
ha. took the long way to get there :)
marthinal has joined
yes, thanks joeco
sure, n/p

Tuesday, 8 September 2015

Adding two repositories to git.

Looking for adding two repo on same git, or say adding another repository other than origin in the same project.

1. Add first repo:

$ git add remote origin master <project repo url>
$ git push -u origin <branch>

2. Adding Second repo

$ git remote add <user> <project repo url>
$ git push <user> <branch>

Tuesday, 30 September 2014

Saturday, 24 May 2014