Are the Docker images intended for dev though? I thought they were more for production / deployment.
Oh my. Youāre right, theyāre not really intended for devā¦ @npruehs are you sure youāre running everything from inside the VM?
Iām hoping to learn a bit more about some of the choices or options mentioned here, and why they might or might not be good ones.
(a) VM: the guide is pretty clear that one of the downsides of using a VM is the potential performance hit. Lots of ram and multiple drives are recommended to help alleviate this. I assume the upsides are mostly that you can build/install a known environment, and that if it goes kerblooey, it doesnāt take other stuff down with it.
Now, I already have an Ubuntu server with hardware RAID drives, Postgres 9.1 and Ruby 1.9.3. While I could partition the array to create two drives, deep down, itāll still just be the one array, so thatās not really an improvement. So why shouldnāt I just install it in the real machine, instead of a virtual one? Or, conversely, I have a spare server that isnāt even running. It would appear that doing so means instead of steps 1, 2, 3, 4, and 5, I have just step 3, and thatās it. Iām just not sure what hidden downsides of non-virtuality might be.
(b) One of the comments has a āhow to do this on Ubuntu.ā Nice. Whether Iām using a VM or not, if I were going to pull a server out of storage and fire it up, what would be a really good machine to do it with? If Iām going to go the VM route, youāve said āone SSD, and then another drive, possibly also SSDā, and ā8 gig of system memory.ā Care to recommend an OS? (Ubuntu? Debian? Windows? Mac? I mean, I do have an XServe available.) Processor, or maybe a core count? Do I need just a few gigabytes on the drives, or would <128 Gig be awfully crowded?
Answering something other than your question but you will need a newer version of ruby. 2.x at least.
Mmph. And presto-texto, the answer to (b) is right smack dab at the top of the āOfficial Discourse Install Guide.ā 2gig, 2cores, 2gig swap, Ubuntu 12.04LTS.
(I would have just edited my previous entry to reflect this, but it didnāt work. āEditā got me a spinner for well over four minutes before I gave up. )
It appears that my WiFi router went catatonic at just the wrong time. {roll eyes} Editing posts now seems to work just fine.
Hmm. www.discourse.org/faq told me 1.9.3. Perhaps it needs to be updated . . .
You are correct. I would really suggest something from the 2.x series. There are a lot of memory and performance improvements.
I moved 4 posts to a new topic: Schema.rb vs migrations
In case you want to install Discourse on real machine for Development Purpose, you may want to refer below guide:
As it happens, the production Discourse that Iām currently running ended up being installed using those instructions. They are deprecated, but the story of why I didnāt do it the currently supported way can be found in the thread titled āWhatās the secret for getting ssh to work into a container?ā
As somebody in that thread points out, the current recommended installation procedure, using Docker, does not, in and of itself, virtualize the installation, although it does containerize it. If I understand correctly, this gets you the isolation benefits of a VM machine without the overhead of full emulation.
Thatās odd! I posted this guide yesterday, to install Discourse on Ubuntu for Development purpose.
Oh, you did? My apologies! Iām afraid I just assumed it was the same āhow to install discourse on ubuntuā guide that Iād used. Now Iām curious, and must go check it out.
Sure! Please do.
The url for vagrant in the blogpost is outdated, it should now be:
Iām getting this error, any ideas?
/vagrant (master)]$ bundle exec rake db:migrate
ln: failed to create symbolic link `/vagrant/public/plugins/emoji': Protocol error
/vagrant/lib/validators/email_validator.rb:25: warning: regular expression has ']' without escape
rake aborted!
SyntaxError: /vagrant/lib/validators/email_validator.rb:25: syntax error, unexpected $undefined
/^[a-zA-Z0-9!#$%&'*+\/=?\^_`{|}~\-]+(?:\.[a-...
^
/vagrant/lib/validators/email_validator.rb:25: syntax error, unexpected $undefined, expecting keyword_end
...`{|}~\-]+(?:\.[a-zA-Z0-9!#$%&'\*+\/=?\^_`{|}~\-]+)*@(?:[a-zA...
... ^
unmatched close parenthesis: /=?\^_`{|}~\-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\
-]*[a-zA-Z0-9])?$/
are you on latest, I wonder if this is a regression in new code by @neil (those validations are new afaik)
What ruby version is vagrant running?
Looks like youāre using an old version of ruby. I tried in the vagrant image and didnāt get that error, but I had upgraded ruby a while ago.
Do this and then try again:
rvm get stable
rvm install 2.0.0-p451
rvm use --default 2.0.0-p451
If itās using ruby 2.0.0-p0, then it definitely needs to be upgraded.
Can @techAPJ help us get this Vagrant image up to date?
I changed the regexp to avoid the ruby bug that causes that error in ruby 2.0.0-p0 and earlier.
Iāll give it a try, thanks.
Edit:
I think that did the trick! It hasnāt loaded yet, but I can see the internals working and everything. The tab has also been renamed āVagrant Discourseā
I did get one minor error though:
[vagrant@precise32:/vagrant (master)]$ bundle exec rake db:migrate
ln: failed to create symbolic link `/vagrant/public/plugins/emoji': Protocol error
Edit:
Itās been trying to load for almost ten minutes. Is that normal? Comp specs. These were the last messages:
I, [2014-06-10T15:53:24.720091 #6554] INFO -- : Rendered common/_discourse_javascript.html.erb (56.0ms)
I, [2014-06-10T15:53:24.737944 #6554] INFO -- : Completed 200 OK in 17633ms (Views: 15750.6ms | ActiveRecord: 188.4ms)
Edit:
Finally loaded!
How can I feed it commands, like
RAILS_ENV=development bundle exec rails c
u = User.last
u.admin = true
u.save
while it is running?