We decided to try out Discourse and see how complex it would be to get it up and running on OS X. Our goal is to make Discourse installation as easy as possible for any user running a Mac, either for development or just to try it out and show it to people.
After hours having patience we were able to get it up (Initially Ruby 2.1.5-p273). We tried different Ruby builds (static builds) but most of the time the goal was to boot the app. This means that lots of tests failed.
We finally did a static build of Ruby 2.2.0-p0 (released yesterday) and booted successfully.
Looking at high number of failing tests had me uneasy, though. Started following the instructions for advanced developers and the OS X specific instructions. A surprise we had was that Discourse can’t work if one tries Ruby 2.2.0 (this can be addressed, we made minor changes to Discourse’s Gemfile and Gemfile.lock for this)
Without much options left, we decided to rebuild another Ruby (2.1.3-p242) and try it out. We were able to boot Discourse and have all tests passing.
The Tokaido we are going to release either today or tomorrow will come with Ruby 2.2.0-p0 and Rails 4.2.0.
We care about making everyones live easier to get up and running with Discourse. We will release this Tokaido with the ‘convert’ binary that Discourse uses, Redis binary, Postgres.app detection, and the mail catcher gem.
My question is, what are the plans for upgrading Discourse to Ruby 2.2.0? I’m currently trying to get the tests passing. So far I have noticed conflict with the
freeze_time mocker on spec_helper and I’m not sure where it comes from, perhaps problems with mocha/api and Ruby 2.2.0? I changed the helper method slightly and brought the failing tests down a bit, still got 2 failing out of the 3953 examples.
It would be nice to learn the state of this. If anyone would like to try Discourse on Ruby 2.2.0 you need to do the following:
// You need Xcode // (needed for qunit tests) Install PhantomJS (you can install it directly with homebrew, or you could use homebrew to install nodejs first and then run $ npm install -g phantomjs) // manually first Download Postgres.app (search the web) $ gem install stackprof --no-ri --no-rdoc $ gem install memory_profiler --no-ri --no-rdoc $ gem install mailcatcher --no-ri --no-rdoc //////////////////////////////////////////////////////////// In your Gemfile Find gem 'stackprof', require: false, platform: :mri_21 gem 'memory_profiler', require: false, platform: :mri_21 Replace gem 'stackprof', require: false, platform: :mri gem 'memory_profiler', require: false, platform: :mri /////////////////////////////////////////////////////////// // In your Gemfile.lock Find rbtrace (0.4.5) and replace to rbtrace (0.4.6) /////////////////////////////////////////////////////////// Open Postgres.app Run $ redis-server (separate shell) Run $ mailcatcher (separate shell) cd to your discourse directory and run: $ bundle $ bundle exec sidekiq (separate shell) $ bundle exec rake db:create db:migrate db:test:prepare $ (optional) bundle exec autospec $ bundle exec rails server