Sidekiq "needs X11" in a rails project - ruby-on-rails-3

I'm trying to use sidekiq in a project but have run into an unusual problem that makes no sense.
I've got multiple rails applications on my laptop, many of which are using sidekiq, and are running fine without any problems.
This application also uses sidekiq, and used to work however I'm not running into a problem. I've not touched the project for a while, but the only difference between now, and when it used to work is the upgrade from OS X Lion, to Mountain Lion. This however hasn't effected other projects, so I'm not sure what's going on. When I try to launch Sidekiq, I get an alert stating
To open "sidekiq," you need to install X11.
Would you like to install X11 now?
It's the standard Apple alert, however I don't understand why Sidekiq is supposedly trying to use X11, and why it isn't using it on my other projects?
I'm using
Rails 3.2.8
Ruby 1.9.3p125
Sidekiq 2.13.1
Any help would be really appreciated :)

Got it running. Turned out it wasn't an issue with Sidekiq, but rather ruby for some reason. After I updated ruby to 2.0.0 and fixed other gem issues, the app started up again and is now running. No idea what was going on but it's sorted :)

Related

Jruby 1.7.x compatibility with Warbler gemjar

I have an application using JRuby 1.6.7, Ruby 1.9.2, Rails 3.1.3 and Warbler 1.4.0.beta2
For a while now, I have been trying to update the application to use JRuby 1.7.x. Every time I tried (with versions 1.7.3, 1.7.4, and most recently 1.7.6) I would get the following error:
org.jruby.rack.RackInitializationException: No such file or directory - /home/production/var/tmp/Jetty_0_0_.war/webapp/WEB-INF/lib/gems.jar!/gems/activesupport-3.1.3/lib/active_support/locale/en.yml
After some help from this question here: Warble not including active support locale files, pin pointed that that issue was with the warbler configuration in my application. We had enabled the following configuration:
config.features = %w(gemjar executable compiled)
Specifically, the gemjar feature was the one causing the issue. With that feature disabled, everything works fine (the WAR deploys perfectly)
I am wondering, if anyone else has run into this, or if anyone knows what the issue might be?
And then more specifically, what are the disadvantages to disabling the gemjar feature of Warbler? From what I can tell, there shouldn't theoretically be anything devastating by disabling it... but I may be overlooking something.
(I do also wonder if the full warbler 1.4.0 release might fix this... but I can't find anything about when a release might be coming out)
there are none - actually running a .war with gemjar might have issues on some servers (esp. if they do not expand the deployed .war, since then it's quite hard to reference files/resources packaged in a .war while still inside a .jar). on the other hand it should roll fine if things are expanded (even with gemjar) ...
you should definitely report this with Warbler's repository (if not reported already).
it should not be hard to fix - likely a one liner, I know a PR would be most welcome :)
NOTE: on the other hand if it worked in a previous JRuby and updating 1.7.x is the issue, than it might be a "regression" on JRuby's side and they might actually fix this if they knew about it ...

Is it possible to deploy rails3 and rails4 in the same server?

I just want to know if is possible to deploy to passenger a project that I have in rails3 (ruby-1.9.3) and another project in rails4 (ruby-2.0.0). I have installed ruby using RVM on my production server, I'm just wondering if is going to be possible to have 2 different projects on the same production server.
Regards
No problem in that, but there're couple things that you need to do first.
Install nginx instead of Apache and use it with unicorn. You can find a whole lot of setup guides depending on your production server OS, or use the capistrano-nginx-unicorn gem if you use Capistrano for deployment.
Use the rvm-capistrano gem to manage the ruby versions and gemsets used in each project. It's pretty well documented, but if you have further questions, feel free to ask.
If you'll need any further help, you may also consider asking on the freenode#rvm channel. I found some great hints there.

Pushing new Rails 3.1 app to Heroku causing problems with Sorcery mod (requiring bson-1.4.1)

I have an app that runs great locally. Everything seems to be set up correctly to transfer over to Heroku, including the Postgres gem (and dev was done using a postgres server).
The problem is, when I try to push it up, I get error messages surrounding the three currently problematic dependencies, bson_ext, bson, and mongoid, 1.4.1. It seems that Sorcery requires these (at 1.4.1) to run. I got them installed locally by downloading the manually, but they were yanked from the online sources. So when Heroku tries to find them, it can't, and it aborts. I tried specifying to use 1.4.0 for all of them, and the app then installs fine (and does the database setup stuff for the Cedar stack, etc).
The problem is that when I load the app on their server, I get the generic "oops, there's been a problem" Heroku message. Upon checking the actual heroku log, I can't really find anything wrong. What is the way to make this work?
Thanks for your help.
I ran into the same problem, and I was able to get past it by specifying version 1.3.1 for the mongo, bson, and bson_ext gems. I just put this in my Gemfile:
gem 'mongo', '1.3.1'
gem 'bson', '1.3.1'
gem 'bson_ext', '1.3.1'

Upgrade Rails 2.3.14 to Rails 3.1.0, or re-write app fresh in Rails 3.1.0

I have upgraded my app to Rails 3.1.0, and while I have solved many compatibility issues, but I have also noticed that there are many redundant files, junk codes, and some features I have to recode again.
I am just wondering if I should just rewrite my app from fresh in Rails 3.1.0, or continue modifying and fixing after the upgrade? The former one will produce a cleaner app, but more work, and the latter one will be faster, but will also take some time to clean up the mess. What is my best approach?
Thanks.
what I do is create a fresh empty rails 3.1 app. Install my gems with bundler. Then I copy over my migrations, my models and my spec tests. Run my tests. Get tests passing, resolve any incompatibility issues. Repeat with config/routes, controllers, views, etc.

What continuous integration servers work well with ruby on rails 3 and mac?

I am using a mac as the server. I need something that works well.
I wanted to use atlassian's bamboo but my attempts have failed. The latest doc I can find on the topic is an old blog post. http://blogs.atlassian.com/news/2009/05/bamboo_customer_8.html which helps very little and results in the error:
...rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems.rb:900:in `report_activate_error': Could not find RubyGem bundler (>= 0) (Gem::LoadError)
I looked at http://rubyforge.org/frs/?group_id=2918 which also appears to be years out of date.
So the question is, which Continuous integration server should I use for my rails 3 project, which I can run on a mac and use .rvm (today in 2011)?
Jenkins is always worked for me, you even have a OSX installer:
http://ingorichter.blogspot.com/2011/04/jenkins-osx-installer.html
CI Joe works fine for me with rails 3 and mac.
Jenkins also seems nice, though, as Ed_ mentioned. Especially the part about the OSX installer.
CruiseControl.rb is a CI written in Ruby and can be used for Rails projects.