Getting Discourse Development running again


(cpradio) #1

Okay, so I somehow screwed up my discourse development box :frowning:

I’ve spent the past 24 hours attempting to get it back and I’m finally close, but I’m running into the following

discourse@discourse:~/discourse$ bundle exec rake db:migrate db:test:prepare db:seed_fu
ln: failed to create symbolic link ‘/media/sf_discourse/public/plugins/emoji’: Read-only file system
2014-08-28T14:40:26Z 24653 TID-ox4vy6sdc INFO: Sidekiq client with redis options {:url=>"redis://localhost:6379/0", :namespace=>"sidekiq"}
rake aborted!
ActiveRecord::StatementInvalid: PG::Error: ERROR:  relation "users" does not exist
LINE 1: SELECT  "users".* FROM "users"   ORDER BY "users"."id" ASC L...
                               ^
: SELECT  "users".* FROM "users"   ORDER BY "users"."id" ASC LIMIT 1
/media/sf_discourse/plugins/discourse-theme/plugin.rb:53:in `block in activate!'
/media/sf_discourse/lib/plugin/instance.rb:96:in `call'
/media/sf_discourse/lib/plugin/instance.rb:96:in `block in notify_after_initialize'
/media/sf_discourse/lib/plugin/instance.rb:95:in `each'
/media/sf_discourse/lib/plugin/instance.rb:95:in `notify_after_initialize'
/media/sf_discourse/config/application.rb:155:in `block (2 levels) in <class:Application>'
/media/sf_discourse/config/application.rb:155:in `each'
/media/sf_discourse/config/application.rb:155:in `block in <class:Application>'
/media/sf_discourse/config/environment.rb:5:in `<top (required)>'
PG::Error: ERROR:  relation "users" does not exist
LINE 1: SELECT  "users".* FROM "users"   ORDER BY "users"."id" ASC L...
                               ^
/media/sf_discourse/plugins/discourse-theme/plugin.rb:53:in `block in activate!'
/media/sf_discourse/lib/plugin/instance.rb:96:in `call'
/media/sf_discourse/lib/plugin/instance.rb:96:in `block in notify_after_initialize'
/media/sf_discourse/lib/plugin/instance.rb:95:in `each'
/media/sf_discourse/lib/plugin/instance.rb:95:in `notify_after_initialize'
/media/sf_discourse/config/application.rb:155:in `block (2 levels) in <class:Application>'
/media/sf_discourse/config/application.rb:155:in `each'
/media/sf_discourse/config/application.rb:155:in `block in <class:Application>'
/media/sf_discourse/config/environment.rb:5:in `<top (required)>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

Disregard the emoji part, I don’t care about that. I do care about the user relations error… I’m not sure where that is coming from.


(cpradio) #2

Okay, so it seems to be related to how I mounted discourse :frowning: Changing that up, seems to have gotten it to run again.


(Jens Maier) #3

Now I have to ask, how did you mount Discourse? :smile:


(cpradio) #4

Shared Folder through a Virtual Box instance. I had it mounted to /media/sf_discourse and used a symbolic link to place it at /home/discourse/discourse. It ends up Discourse doesn’t like that :smile:

So I altered my entire plan of attack and now it pulls the source from a special branch (that I deem “ready”)


(cpradio) #5

I may try and alter my plan again later, by just re-mounting it once the VM is started, so I can mount it in /home/discourse/discourse, but for the time being, this seems to work and leaves me in a “semi-stable” state most of the time.


(Jens Maier) #6

Wouldn’t it be easier – log term – to install Samba in the VM and mount the Samba share in Windows?


(cpradio) #7

It would if I were using Windows, but I’m actually using Linux and instead of installing postgres, ruby, and all of its cohorts on my base install, I’ve decided to continue utilizing a VM for it.

Plus, then I can transfer my VM to other devices and keep going.


(Jens Maier) #8

One more reason to move the code into the VM as well, no? :slight_smile:


(cpradio) #9

Yeah, I could. But having it simple as git clone … to get coding and then utilizing my “coding” branch to maintain current works in progress, isn’t too troubling yet.

Plus I’d hate to give up my IDE or have to place a GUI on the VM :frowning: