org-roam / org-roam-server

A Web Application to Visualize the Org-Roam Database
MIT License
639 stars 51 forks source link

cannot start the server on localhost #83

Closed roiholtzman closed 4 years ago

roiholtzman commented 4 years ago

I am running M-x org-roam-server-mode RET to enable the global mode (as said in the instructions). But I get the following error helm-M-x-execute-command: EmacSQL had an unhandled condition: "near line 2181: no such column: title"

What could be the issue?

(I am running org-mode on spaceman's successfully. Currently I use firefox to view the graph).

goktug97 commented 4 years ago

You should update your org-roam to the latest version

roiholtzman commented 4 years ago

@goktug97 I am quite new to emacs. Can you please explain how should I update org-mode?

goktug97 commented 4 years ago

This will update all of your packages to the latest one.

Then Restart Emacs

roiholtzman commented 4 years ago

Thanks! updated.

But I still get the same error as before: helm-M-x-execute-command: EmacSQL had an unhandled condition: "near line 11: no such column: title"

goktug97 commented 4 years ago

Did you restart the emacs? Try removing the .db file from your org-roam-directory so it is forced to create a new one

roiholtzman commented 4 years ago

I did restart.

Now I removed the .db file and restarted emacs. It created a new one, but still I get the same error: helm-M-x-execute-command: EmacSQL had an unhandled condition: "near line 447: no such column: title"

goktug97 commented 4 years ago

Can you tell me the org-roam and the org-roam-server that are installed in your setup? You can use package-list-packages and search for the packages.

roiholtzman commented 4 years ago

What do you mean?

BTW - I just noticed that the org-roam version I have is 1.1.1 (when I execute M-x org-roam-version). So I guess it wasn't really updated...

goktug97 commented 4 years ago

Are you loading org-roam from a folder?

roiholtzman commented 4 years ago

I am not sure...

My org-roam is installed as a private layer (I think). I have a packages.el file in ~/.emacs.d/private/org-roam/, which has the following configuration (BTW - I am running on spacemacs)

(defconst org-roam-packages
  '(org-roam
    org-roam-bibtex))

(defun org-roam/init-org-roam ()
  (use-package org-roam
    :hook
    (after-init . org-roam-mode)
    :custom
    (org-roam-directory "~/Dropbox/PHD/org-roam/")
    (org-roam-db-location "~/org-roam.db")
    :init
    (progn
      (spacemacs/declare-prefix "ar" "org-roam")
      (spacemacs/set-leader-keys
        "arl" 'org-roam
        "art" 'org-roam-dailies-today
        "arf" 'org-roam-find-file
        "ari" 'org-roam-insert
        "arb" 'org-roam-switch-to-buffer
        "arg" 'org-roam-graph)

      (spacemacs/declare-prefix-for-mode 'org-mode "mr" "org-roam")
      (spacemacs/set-leader-keys-for-major-mode 'org-mode
        "rl" 'org-roam
        "rt" 'org-roam-dailies-today
        "rb" 'org-roam-switch-to-buffer
        "rf" 'org-roam-find-file
        "ri" 'org-roam-insert
        "rg" 'org-roam-graph))
    :config
    (setq org-roam-link-title-format "R:%s")

    (setq org-roam-graph-viewer "/Applications/Firefox.app/Contents/MacOS/firefox")

    (setq org-roam-graph-executable "/usr/local/bin/neato")
    (setq org-roam-graph-extra-config '(("overlap" . "false")))

    (setq org-roam-capture-templates
          '(("d" "default" plain
             (function org-roam-capture--get-point)
             "%?"
             :file-name "%<%Y%m%d%H%M%S>-${slug}"
             :head "#+TITLE: ${title}\n#+CREATED: %U\n#+LAST_MODIFIED: %U\n#+OPTIONS: toc:nil, ':t\n#+LATEX_HEADER: \\usepackage[margin=1.1in]{geometry}\n#+LATEX_HEADER: \\renewcommand{\\baselinestretch}{1.25}\n\n"
             :unnarrowed t)
            ("D" "default copy" plain
             (function org-roam-capture--get-point)
             "%?"
             :file-name "%<%Y%m%d%H%M%S>-${slug}"
             :head "#+TITLE: ${title}\n#+CREATED: %U\n#+LAST_MODIFIED: %U\n\n"
             :unnarrowed t)))))
goktug97 commented 4 years ago

Unfortunately I don't have knowledge about different emacs distributions. Your current problem is using old version of org-roam. The database structure is changed in newer versions and org-roam-server is changed accordingly. The latest org-roam-server version is incompatible with old org-roam versions

roiholtzman commented 4 years ago

I see. So I just need to figure out how to update my org-roam version. Do you think deleting the folder of org-roam from the elpa folder will help?

goktug97 commented 4 years ago

I think it should work

roiholtzman commented 4 years ago

So it worked:) Now the command M-x org-roam-server-mode RET works!

How should I now configure things so that the graph will open up as wanted?

Right now I have in the configuration this (setq org-roam-graph-viewer "/Applications/Firefox.app/Contents/MacOS/firefox") so that it is opened on Firefox as before...

goktug97 commented 4 years ago

org-roam-graph and org-roam-server are two different things. When you start the org-roam-server you should visit http://localhost:8080 to see your graph. As long as server is opened everything will be updated as you take your notes.

roiholtzman commented 4 years ago

AMAZING!! Thank you !

BTW, what is the configuration that I see in the gif in the readme in GitHub? Is it a window inside emacs? Can it be configured in spacemacs as well?

goktug97 commented 4 years ago

They are different windows, the right one is the qutebrowser. The emacs is using doom-molokai theme.

roiholtzman commented 4 years ago

So qutebrowser is opened inside emacs?

goktug97 commented 4 years ago

No, they are separate windows in i3 window manager.