Search Results

Search found 13055 results on 523 pages for 'embedded ruby'.

Page 14/523 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Convert SQL query to Ruby help

    - by Verloren
    Hey all, I need to query my database table to find which employee has the most support tickets related to them. I can do this just fine using this MySQL query: SELECT employee_id, COUNT(id) AS number_of_tickets FROM tickets GROUP BY employee_id ORDER BY number_of_tickets DESC LIMIT 1; How would write this in Ruby-on-Rails? Thanks very much for your assistance. I use Ruby version 1.8.6, Rails version 2.2.2 and MySQL Server version 5.0.

    Read the article

  • Mavericks system Ruby and gem broken

    - by T1000
    When I tried to run ruby -v or gem -v (or any other command), I get: dyld: lazy symbol binding failed: Symbol not found: _ruby_run Referenced from: /usr/local/bin/ruby Expected in: /usr/lib/libruby.dylib dyld: Symbol not found: _ruby_run Referenced from: /usr/local/bin/ruby Expected in: /usr/lib/libruby.dylib This is after I ran rvm system to temporally switch to the system default Ruby. RVM is working fine, but I have a special need to install a gem to the system Ruby and I can't because of this problem. Does anyone know why? It seems to be some kind of link problem to Ruby, but I'm don't know how to solve this. I ran which ruby and it's at this point located in "/usr/local/bin/ruby". I checked the Ruby in "/usr/lib/" and it's pointing to my system Ruby: "../../System/Library/Frameworks/Ruby.framework/Versions/Current/usr/lib/ruby" Any help would be appreciated.

    Read the article

  • Ruby on rails: Staring mongrel server

    - by spin-docta
    I know mongrel is the default server for "script/server" but when I do that command I get webrick. (I had it working before with mongrel). Now when I tell is to use mongrel ("script/server mongrel") the server fails to start up in the terminal. I get this: $ script/server mongrel ^C/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel/gems.rb:11:in `require': Interrupt from /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:17 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:521:in `new_constants_in' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require' from /Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:1 from /Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/handler.rb:17:in `const_get' from /Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/handler.rb:17:in `get' from /Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/handler.rb:17:in `each' from /Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/handler.rb:17:in `get' from /Users/devinross14/.gem/ruby/1.8/gems/rails-2.3.3/lib/commands/server.rb:45 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require' from script/server:3 I just upgraded to snow leopard if that helps...

    Read the article

  • Migrating Ruby Site from EngineYard to Heroku

    - by user410925
    As part of a larger project I've been tasked with migrating some existing Ruby on Rails sites (built with an old version of refinerycms 0.9.6.34, at least that's the version listed in the Gemfile included with the source). I don't normally work with Ruby so I'm at a bit of a loss. The previous developers simply handed over the latest git dump as well as a db dump. I'm working first with trying to get the site up working locally on an Ubuntu 11.10 local machine before pushing up to at test Heroku install. If it's possible to just push directly to Heroku with the files they gave, then I can try that, but it's my understanding I need to get everything working and then use Heroku's tools to deploy. The previous devs said they're using ruby 1.8.7 so in Ubuntu I've done the following: aptitude install ruby1.8 ruby1.8-dev ruby1.8-full aptitude install rubygems1.8 I've restored the database and in the config directory I've made changes to the database.yml to point to the restored database. When I try and run "bundle install" from the root of the extracted source dir I get: Invalid gemspec in [/var/lib/gems/1.8/specifications/mail-2.4.4.gemspec]: invalid date format in specification: "2012-03-14 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid date format in specification: "2011-08-25 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/mime-types-1.18.gemspec]: invalid date format in specification: "2012-03-21 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/sass-rails-3.2.5.gemspec]: invalid date format in specification: "2012-03-19 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/jquery-rails-2.0.2.gemspec]: invalid date format in specification: "2012-04-03 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/mail-2.4.4.gemspec]: invalid date format in specification: "2012-03-14 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid date format in specification: "2011-08-25 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/mime-types-1.18.gemspec]: invalid date format in specification: "2012-03-21 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/sass-rails-3.2.5.gemspec]: invalid date format in specification: "2012-03-19 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/jquery-rails-2.0.2.gemspec]: invalid date format in specification: "2012-04-03 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/mail-2.4.4.gemspec]: invalid date format in specification: "2012-03-14 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/tilt-1.3.3.gemspec]: invalid date format in specification: "2011-08-25 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/mime-types-1.18.gemspec]: invalid date format in specification: "2012-03-21 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/sass-rails-3.2.5.gemspec]: invalid date format in specification: "2012-03-19 00:00:00.000000000Z" Invalid gemspec in [/var/lib/gems/1.8/specifications/jquery-rails-2.0.2.gemspec]: invalid date format in specification: "2012-04-03 00:00:00.000000000Z" Fetching gem metadata from https://rubygems.org/....... Fetching gem metadata from https://rubygems.org/.. Using rake (0.9.2.2) Using i18n (0.6.0) Using multi_json (1.3.6) Using activesupport (3.2.3) Using builder (3.0.0) Using activemodel (3.2.3) Using erubis (2.7.0) Using journey (1.0.3) Using rack (1.4.1) Using rack-cache (1.2) Using rack-test (0.6.1) Using hike (1.2.1) Installing tilt (1.3.3) Using sprockets (2.1.3) Using actionpack (3.2.3) Installing mime-types (1.18) Using polyglot (0.3.3) Using treetop (1.4.10) Installing mail (2.4.4) Using actionmailer (3.2.3) Using arel (3.0.2) Using tzinfo (0.3.33) Using activerecord (3.2.3) Using activeresource (3.2.3) Using acts_as_indexed (0.7.8) Using awesome_nested_set (2.1.3) Using babosa (0.3.7) Using bcrypt-ruby (3.0.1) Using coffee-script-source (1.3.3) Using execjs (1.4.0) Using coffee-script (2.2.0) Using rack-ssl (1.3.2) Using json (1.7.3) Using rdoc (3.12) Using thor (0.14.6) Using railties (3.2.3) Using coffee-rails (3.2.2) Using orm_adapter (0.0.7) Using warden (1.1.1) Using devise (2.0.4) Using dragonfly (0.9.12) Using friendly_id (4.0.6) Using paper_trail (2.6.3) Using globalize3 (0.2.0) Installing jquery-rails (2.0.2) Using bundler (1.1.4) Using rails (3.2.3) Using sass (3.1.19) Installing sass-rails (3.2.5) Using truncate_html (0.5.5) Using uglifier (1.2.4) Using will_paginate (3.0.3) Using refinerycms-core (2.0.4) Using refinerycms-authentication (2.0.4) Using refinerycms-dashboard (2.0.4) Using refinerycms-images (2.0.4) Using seo_meta (1.3.0) Using refinerycms-pages (2.0.4) Using refinerycms-resources (2.0.4) Using refinerycms (2.0.4) Using routing-filter (0.3.1) Using refinerycms-i18n (2.0.0) Using sqlite3 (1.3.6) Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. Obviously the errors with Invalid gemspec need to be resolved, but the other thing that's troubling to me are the lines: Using refinerycms-core (2.0.4) Using refinerycms-authentication (2.0.4) Using refinerycms-dashboard (2.0.4) Using refinerycms-images (2.0.4) Using seo_meta (1.3.0) Using refinerycms-pages (2.0.4) Using refinerycms-resources (2.0.4) Using refinerycms (2.0.4) Using routing-filter (0.3.1) Using refinerycms-i18n (2.0.0) Since the refinerycms version listed in the Gemfile was 0.9.6.34. When it comes to the Ruby world, I'm a bit lost so any help would be greatly appreciated. Thanks,

    Read the article

  • RPi and Java Embedded GPIO: Writing Java code to blink LED

    - by hinkmond
    So, you've followed the previous steps to install Java Embedded on your Raspberry Pi ?, you went to Fry's and picked up some jumper wires, LEDs, and resistors ?, you hooked up the wires, LED, and resistor the the correct pins ?, and now you want to start programming in Java on your RPi? Yes? ???????! OK, then... Here we go. You can use the following source code to blink your first LED on your RPi using Java. In the code you can see that I'm not using any complicated gpio libraries like wiringpi or pi4j, and I'm not doing any low-level pin manipulation like you can in C. And, I'm not using python (hell no!). This is Java programming, so we keep it simple (and more readable) than those other programming languages. See: Write Java code to do this In the Java code, I'm opening up the RPi Debian Wheezy well-defined file handles to control the GPIO ports. First I'm resetting everything using the unexport/export file handles. (On the RPi, if you open the well-defined file handles and write certain ASCII text to them, you can drive your GPIO to perform certain operations. See this GPIO reference). Next, I write a "1" then "0" to the value file handle of the GPIO0 port (see the previous pinout diagram). That makes the LED blink. Then, I loop to infinity. Easy, huh? import java.io.* /* * Java Embedded Raspberry Pi GPIO app */ package jerpigpio; import java.io.FileWriter; /** * * @author hinkmond */ public class JerpiGPIO { static final String GPIO_OUT = "out"; static final String GPIO_ON = "1"; static final String GPIO_OFF = "0"; static final String GPIO_CH00="0"; /** * @param args the command line arguments */ public static void main(String[] args) { FileWriter commandFile; try { /*** Init GPIO port for output ***/ // Open file handles to GPIO port unexport and export controls FileWriter unexportFile = new FileWriter("/sys/class/gpio/unexport"); FileWriter exportFile = new FileWriter("/sys/class/gpio/export"); // Reset the port unexportFile.write(GPIO_CH00); unexportFile.flush(); // Set the port for use exportFile.write(GPIO_CH00); exportFile.flush(); // Open file handle to port input/output control FileWriter directionFile = new FileWriter("/sys/class/gpio/gpio"+GPIO_CH00+"/direction"); // Set port for output directionFile.write(GPIO_OUT); directionFile.flush(); /*--- Send commands to GPIO port ---*/ // Opne file handle to issue commands to GPIO port commandFile = new FileWriter("/sys/class/gpio/gpio"+GPIO_CH00+"/value"); // Loop forever while (true) { // Set GPIO port ON commandFile.write(GPIO_ON); commandFile.flush(); // Wait for a while java.lang.Thread.sleep(200); // Set GPIO port OFF commandFile.write(GPIO_OFF); commandFile.flush(); // Wait for a while java.lang.Thread.sleep(200); } } catch (Exception exception) { exception.printStackTrace(); } } } Hinkmond

    Read the article

  • RPi and Java Embedded GPIO: Sensor Reading using Java Code

    - by hinkmond
    And, now to program the Java code for reading the fancy-schmancy static electricity sensor connected to your Raspberry Pi, here is the source code we'll use: First, we need to initialize ourselves... /* * Java Embedded Raspberry Pi GPIO Input app */ package jerpigpioinput; import java.io.FileWriter; import java.io.RandomAccessFile; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Calendar; /** * * @author hinkmond */ public class JerpiGPIOInput { static final String GPIO_IN = "in"; // Add which GPIO ports to read here static String[] GpioChannels = { "7" }; /** * @param args the command line arguments */ public static void main(String[] args) { try { /*** Init GPIO port(s) for input ***/ // Open file handles to GPIO port unexport and export controls FileWriter unexportFile = new FileWriter("/sys/class/gpio/unexport"); FileWriter exportFile = new FileWriter("/sys/class/gpio/export"); for (String gpioChannel : GpioChannels) { System.out.println(gpioChannel); // Reset the port unexportFile.write(gpioChannel); unexportFile.flush(); // Set the port for use exportFile.write(gpioChannel); exportFile.flush(); // Open file handle to input/output direction control of port FileWriter directionFile = new FileWriter("/sys/class/gpio/gpio" + gpioChannel + "/direction"); // Set port for input directionFile.write(GPIO_IN); directionFile.flush(); } And, next we will open up a RandomAccessFile pointer to the GPIO port. /*** Read data from each GPIO port ***/ RandomAccessFile[] raf = new RandomAccessFile[GpioChannels.length]; int sleepPeriod = 10; final int MAXBUF = 256; byte[] inBytes = new byte[MAXBUF]; String inLine; int zeroCounter = 0; // Get current timestamp with Calendar() Calendar cal; DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss.SSS"); String dateStr; // Open RandomAccessFile handle to each GPIO port for (int channum=0; channum Then, loop forever to read in the values to the console. // Loop forever while (true) { // Get current timestamp for latest event cal = Calendar.getInstance(); dateStr = dateFormat.format(cal.getTime()); // Use RandomAccessFile handle to read in GPIO port value for (int channum=0; channum Rinse, lather, and repeat... Compile this Java code on your host PC or Mac with javac from the JDK. Copy over the JAR or class file to your Raspberry Pi, "sudo -i" to become root, then start up this Java app in a shell on your RPi. That's it! You should see a "1" value get logged each time you bring a statically charged item (like a balloon you rub on the cat) near the antenna of the sensor. There you go. You've just seen how Java Embedded technology on the Raspberry Pi is an easy way to access sensors. Hinkmond

    Read the article

  • Ruby or Rails reporting tools?

    - by Anushank
    I am looking for a report generation tool in ruby or rails which allows the user to define a template, then fetch data into the created template. I have been looking through "The Ruby Box: reporting section." There are two reporting tools I have looked at: Thin Reports: It is really good. You can create your own report template with the template editor. Then you can produce PDF reports using thinreports gems. ODF Report: You can create a template ODF file using Open Office and MS Word, and you can use that template to generate the report. Both of these solutions lack the ability to draw charts. Does anyone know of similar reporting tools that can draw charts within a given report? I have tried the RTF Ruby Library. It works, but shares the limitation that it cannot draw charts and graphs. The minimum requirements are: Able to create customizable templates. (e.g. design layout, set font size, color, embed images etc.) Able to draw tables and charts. Template could be in Docx or excel or xml or any other common file format. Report output report must be in Docx or RTF format. Thanks

    Read the article

  • Rails app Hangs and Ruby uses 100% CPU

    - by tuzzolotron
    I have an apache2 server running Phusion Passenger. On this machine I have two virtual hosts setup each look like this (path's are different for the 2nd virtualhost...but other directives are the same) ServerName beta.mysite.us DocumentRoot "/var/www/beta/mysite/public" <Directory "/var/www/beta/mysite/public"> RewriteEngine on AllowOverride All Options FollowSymLinks </Directory> # http://www.modrails.com/documentation/Users guide.html PassengerAppRoot "/var/www/beta/mysite" RailsEnv development PassengerMaxPoolSize 6 PassengerDefaultUser mysite # PassengerHighPerformance does come at a trade off of lack of support for mod_rewrite PassengerHighPerformance off RailsSpawnMethod conservative RailsFrameworkSpawnerIdleTime 0 RailsAppSpawnerIdleTime 0 PassengerPoolIdleTime 300 ErrorLog "/var/log/httpd/mysite-beta-error_log" CustomLog "/var/log/httpd/mysite-beta-access_log" common Apache starts fine. I can go to one of the virtualhosts and it will load Rails and work. When I go to the second virtualhost, a ruby process spawns ("Rails: /var/www/mysite/current" according to ps awuxf) and uses 100% CPU. This process never exits. At this point neither virtualhost is responsive. If I kill the the offending ruby process, another ruby process replaces it and uses 100% cpu. If I kill these processes about 5-6 times, then both virtualhosts respond but they, are somehow, running the same Rails app?! I have another virtualhost on this machine that is not setup with phusion passenger..This one never exhibits any problems. Any help / ideas would be much appreciated!

    Read the article

  • Installtion problems in ruby

    - by user26202
    Hello , I had ruby in my Red hat linux pc. I manually deleted the folders of ruby in /usr/lib and /usr/bin. Now when I try to install ruby again it says it conflicts with some files which does not exist. rpm -i ruby-libs-1.8.6.111-1.i386.rpm th file from package ruby-libs-1.8.5-5.el5 file /usr/lib/ruby/1.8/yaml/tag.rb from install of ruby-libs-1.8.6.111-1 conflicts with file from package ruby-libs-1.8.5-5.el5 What should I do now ?Can someone guide me. Regards, Mithun

    Read the article

  • Ruby freelancing: realistic expectations?

    - by Sophie
    Hi guys, I'm in a situation where I only need $100 to live at a place. How is this relevant to programming? Well, I would like to hear the opinions of those on this site if it is at all realistic to expect a Ruby noobie to be able to make $100 freelancing by a month from now, assuming a great deal of effort and enthusiasm o_O I'm a complete noob to programming ;d, learning Ruby before Rails. (I also asked this on StackOverflow, but want lots of answers so .<)

    Read the article

  • when to choose ruby on rails over java [closed]

    - by Dany Y
    I have been working with Java EE for 6 years, and I have mostly used it even for simple applications like data-entry to database). I heard Ruby on Rails is superior to Java in this domain. What are the actual advantages of Ruby. and should I switch ? P.S : I know this is a subjective question, and the most probable answer is "depends on what you'll use it for", but this is exactly what I want to know when to use what. Thank you

    Read the article

  • 'Quickly': How can I use Ruby?

    - by ragu.pattabi
    Recently I came across Quickly. A very nice thing Ubuntu is doing in order to simplify creation of good looking applications that integrates well with Ubuntu desktop in every respect. While the demo was so cool and even motived me to learn Python, I am only familiar with Ruby. I would really love if there is a way to make Quickly do similar thing with Ruby. I read something about templates; but couldn't locate much details.

    Read the article

  • Email sent by ActionMailer is taking six hours to deliver mail.

    - by grg-n-sox
    So I have been asked to help maintain a website that uses Ruby on Rails. Now, let me just say I've been programming Ruby for awhile but I am still new to Rails. The first problem brought to my attention is how the activation email takes about six hours to arrive. It would be one thing if the email was not being sent due to errors but it is being send correctly, just slow. Also the server this is running on is also its own SMTP. I checked how the email was being formatted before calling the setup_email method and everything looks okay. I even dug into the ActionMailer lib and read through the files there and didn't see anything out of the ordinary. So what is most likely causing the email to take six hours to deliver?

    Read the article

  • _mask and Rails

    - by Eric Koslow
    So I am trying to get the cancan gem to work with my rails 3 app and I've hit a problem. I tried to copy the code that Ryan Bates (the creator of the gem) used in his screen cast, but I get an error saying that roles_mask is not a method. I figure that the _mask method was removed from Ruby/Rails at some point, and I'm now wondering what is the replacement. Here's the code in my user.rb model: named_scope :with_role, lambda { |role| {:conditions => "roles_mask & #{2**ROLES.index(role.to_s)} > 0 "} } ROLES = %w[admin student principal admissions] def roles=(roles) self.roles_mask = (roles & ROLES).map { |r| 2**ROLES.index(r) }.sum end def roles ROLES.reject { |r| ((roles_mask || 0) & 2**ROLES.index(r)).zero? } end def role? roles.include? role.to_s end def role_symbols roles.map(&:to_sym) end I'm using Rails 3 and Ruby 1.9.2dev Thank you

    Read the article

  • Integrate Jasper in Rails 3

    - by AndreDurao
    I'm trying to integrate a rails 3 app with jasper following this wiki: http://wiki.rubyonrails.org/rails/pages/HowtoIntegrateJasperReports But it seems that a lot of information isn't updated so it's been very hard to make it work by myself. I've also read a topic at ruby-forum: http://www.ruby-forum.com/topic/139453 with some details explained but still couldn't make it work. My first problem is related with the render_to_string method: When the controller method runs I receive a "Template is missing" error: this is the method: def report @customers = Customer.all send_doc(render_to_string(:template => report_customers_path, :layout => false), '/pdfs', 'report.jasper', "customers", 'pdf') end Although this seems simple I'm not understanding why is this happening. Doesn't render_to_string with layout = false suposed to get me the string result of that action? I also tried :action instead of :template, but it does the same. If anybody with some expertise with this integration could help... Thanks in advance, André

    Read the article

  • Web application framework for embedded systems?

    - by datenwolf
    I'm currently developing the software for a measurement and control system. In addition to the usual SCPI interface I'd also give it a nice HTTP frontend. Now I don't want to reinvent the wheel all over again. I already have a simple HTTPD running, but I don't want to implement all the other stuff. So what I'm looking for is a web application toolkit targeted at embedded system development. In particular this has to run on a ARM Cortex-M4, and I have some 8k of RAM available for this. It must be written in C. Is there such a thing or do I have to implement this myself?

    Read the article

  • How difficult is it to change from Embedded programming to a high level programming [on hold]

    - by anudeep shetty
    I have a background in Computer Science. I worked on Embedded programming on Linux file systems, after I finished my Bachelor's degree, for over a year. After that I pursued my masters where most of my course choices involved working on web, java and databases. Now I have an offer to work with a company that is offering a job to work on the OS level. The company is pretty good but I am feeling that my Masters has gone to waste. I wanted to know is it common that a Computer Science major works on low-level coding and is there a possibility that I can work in this company for some years and then move onto an opportunity where I can work on high-level coding? Also is working on low-level programming a safe choice in terms of job opportunities?

    Read the article

  • Halloween: Season for Java Embedded Internet of Spooky Things (IoST) (Part 2)

    - by hinkmond
    To start out our ghost hunting here at the Oracle Santa Clara campus office, we first need a ghost sensor. It's pretty easy to build one, since all we need to do is to create a circuit that can detect small fluctuations in the electromagnetic field, just like the fluctuations that ghosts cause when they pass by... Naturally, right? So, we build a static charge sensor and will use a Java Embedded app to monitor for changes in the sensor value, running analytics using Java technology on a Raspberry Pi. Bob's your uncle, and there you have it: a ghost sensor. See: Ghost Detector So, go out to Radio Shack and buy up these items: shopping list: 1 - NTE312 JFET N-channel transistor (this is in place of the MPF-102) 1 - Set of Jumper Wires 1 - LED 1 - 300 ohm resistor 1 - set of header pins Then, grab a flashlight, your Raspberry Pi, and come back here for more instructions... Don't be afraid... Yet. Hinkmond

    Read the article

  • Getting uninitialized constant error when trying to run tests

    - by Ethan
    I just updated all my gems and I'm finding that I'm getting errors when trying to run Test::Unit tests. I'm getting the error copied below. That comes from creating new, empty Rails project, scaffolding a simple model, and running rake test. Tried Googling "uninitialized constant" and TestResultFailureSupport. The only thing I found was this bug report from 2007. I'm using OS X. These are the gems that I updated right before the tests stopped working: $ sudo gem outdated Password: RedCloth (4.2.1 < 4.2.2) RubyInline (3.8.1 < 3.8.2) ZenTest (4.1.1 < 4.1.3) bluecloth (2.0.4 < 2.0.5) capistrano (2.5.5 < 2.5.8) haml (2.0.9 < 2.2.1) hoe (2.2.0 < 2.3.2) json (1.1.6 < 1.1.7) mocha (0.9.5 < 0.9.7) rest-client (1.0.2 < 1.0.3) thoughtbot-factory_girl (1.2.1 < 1.2.2) thoughtbot-shoulda (2.10.1 < 2.10.2) Has anyone else seen this issue? Any troubleshooting suggestions? UPDATE On a hunch I downgraded ZenTest from 4.1.3 back to 4.1.1 and now everything works again. Still curious to know if anyone else has seen this or has any interesting comments or insights. $ rake test (in /Users/me/foo) /usr/local/bin/ruby -I"lib:test" "/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/helpers/users_helper_test.rb" "test/unit/user_test.rb" /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:105:in `const_missing': uninitialized constant Test::Unit::TestResult::TestResultFailureSupport (NameError) from /usr/local/lib/ruby/gems/1.8/gems/test-unit-2.0.2/lib/test/unit/testresult.rb:28 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:158:in `require' from /usr/local/lib/ruby/gems/1.8/gems/test-unit-2.0.2/lib/test/unit/ui/testrunnermediator.rb:9 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:158:in `require' ... 6 levels... from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:214:in `run' from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run' from /usr/local/lib/ruby/1.8/test/unit.rb:278 from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5 /usr/local/bin/ruby -I"lib:test" "/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/functional/users_controller_test.rb"

    Read the article

  • rails question find no result

    - by Small Wolf
    Hey.Guys! Now .I have a question ,i want someone to help me to solve it ,the log of the problem like the under text >> Department.find(EmeReference.find(:all,:select =>:ref_config_id,:conditions=>"emergency_id = 1")) ActiveRecord::RecordNotFound: Couldn't find Department with ID=0 from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:1591:in `find_one' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:1574:in `find_from_ids_without_cache' from (__DELEGATION__):2:in `__send__' from (__DELEGATION__):2:in `find_from_ids_without_cache' from /usr/lib/ruby/gems/1.8/gems/nkallen-cache-money-0.2.5/lib/cash/query/abstract.rb:158:in `find_from_keys' from /usr/lib/ruby/gems/1.8/gems/nkallen-cache-money-0.2.5/lib/cash/query/primary_key.rb:31:in `miss' from /usr/lib/ruby/gems/1.8/gems/nkallen-cache-money-0.2.5/lib/cash/query/abstract.rb:66:in `hit_or_miss' from /usr/lib/ruby/gems/1.8/gems/nkallen-cache-money-0.2.5/lib/cash/accessor.rb:17:in `call' from /usr/lib/ruby/gems/1.8/gems/nkallen-cache-money-0.2.5/lib/cash/accessor.rb:17:in `fetch' from /usr/lib/ruby/gems/1.8/gems/nkallen-cache-money-0.2.5/lib/cash/accessor.rb:29:in `get' from /usr/lib/ruby/gems/1.8/gems/nkallen-cache-money-0.2.5/lib/cash/query/abstract.rb:65:in `hit_or_miss' from /usr/lib/ruby/gems/1.8/gems/nkallen-cache-money-0.2.5/lib/cash/query/abstract.rb:18:in `perform' from /usr/lib/ruby/gems/1.8/gems/nkallen-cache-money-0.2.5/lib/cash/query/primary_key.rb:17:in `perform' from /usr/lib/ruby/gems/1.8/gems/nkallen-cache-money-0.2.5/lib/cash/query/abstract.rb:7:in `perform' from /usr/lib/ruby/gems/1.8/gems/nkallen-cache-money-0.2.5/lib/cash/finders.rb:29:in `find_from_ids' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:616:in `find' from (irb):135 that's the question! Thank your and best regards!

    Read the article

  • Ruby syntax checking in vim

    - by roybotnik
    Hi everyone, I use vim with various plugins for editing ruby code. I have proper syntax highlighting set up but I was wondering if anyone knew of a way to get ruby syntax checking, similar to what you might see in an IDE such as visual studio, radrails, etc? Something that would simply turn stuff red or break highlighting when I'm missing an 'end' or have an improperly constructed line of code would be sweet. I googled and came across this plugin, http://github.com/scrooloose/syntastic/tree/master but I was wondering if anyone had any better suggestions.

    Read the article

  • Is Cassandra production ready for Ruby on Rails?

    - by funkymunky
    I'm working on a project that is considering using Cassandra as a database. We would like to eventually migrate to Cassandra even if we use MySQL to start with, given its scalability. I know that big companies like Facebook, Digg, and recently Twitter is using Cassandra, but I don't believe any of those sites run off Rails. My question is whether or not it's feasible to use Cassandra using Ruby on Rails. Points to consider: We heavily rely on the Authlogic gem. Would switching to Cassandra affect how it works? Are there any mature ruby clients for Cassandra? Looking on Github it seems that fauna's client is the most mature. Has anyone had production experience with it? Appreciate any tips.

    Read the article

  • Ruby daemons and frequency

    - by mplacona
    Hi, I've written this ruby daemon, and was wondering if somebody could have a look at it, and tell me if the approach I've taken is correct. #!/usr/bin/env ruby require 'logger' # You might want to change this ENV["RAILS_ENV"] ||= "production" require File.dirname(__FILE__) + "/../../config/environment" $running = true Signal.trap("TERM") do $running = false end service = Post.new('http://feed.com/feeds') logger = Logger.new('reader.log') while($running) do # Log my calls logger.info "Run at #{Time.now}" service.update_from_feed_continuously # only run it every 5 minutes or so sleep 300 end I feel like this last loop is not quite the right thing to do, and can be memory intensive, but I'm not sure. Also, the 5 minutes seem to never happen exactly every 5 minutes, and I'll see variations of 4-6 minutes. thanks in advance

    Read the article

  • Ruby Summer of Code Project Ideas

    - by blatyo
    So, I'm thinking about applying for Ruby Summer of Code. However, I'm not sure what I want to propose. I was wondering if any of my fellow redditors had any good ideas? I've been programming in Ruby for about 3 years. I am primarily a web developer, but I do things related to bit torrent, data mining, and databases as well. I have a bit torrent related gem that I wrote for the hell of it. I've also got some projects on Github (username: blatyo). I am looking for ideas for me, but anything you can think of that would be awesome I would like to hear as well.

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >