Quantcast
Channel: ruby-on-rails-3.1 – w3toppers.com
Browsing all 3 articles
Browse latest View live

ExecJS and could not find a JavaScript runtime

Ubuntu Users I’m on Ubuntu 11.04 and had similar issues. Installing Node.js fixed it. As of Ubuntu 13.04 x64 you only need to run: sudo apt-get install nodejs This will solve the problem....

View Article


Image may be NSFW.
Clik here to view.

Subqueries in activerecord

Rails now does this by default Message.where(user_id: Profile.select("user_id").where(gender: 'm')) will produce the following SQL SELECT "messages".* FROM "messages" WHERE "messages"."user_id" IN...

View Article


Rails 3.1 asset precompilation – include all javascript files

config.assets.precompile accepts regular expressions and wildcard matching – so to ensure all js files get compiled, without specifying each by name, something like this should do the trick:...

View Article
Browsing all 3 articles
Browse latest View live