Search Results

Search found 550 results on 22 pages for 'rubygems'.

Page 8/22 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Automatically create tag based on the string

    - by Gautam
    Hello, I am new to ruby on rails. Lets say i have this text.. Ashley Cole and Cheryl Cole Split. Is there a way to automatically tag this above text to Ashley Cole, Cheryl Code, ChelseaFC ( Ashley Cole plays football (Soccer) for that club. Please help.. Also which is the best tagging gem available? Looking forward for your help Thanks Gautam

    Read the article

  • getting rid of ruby gems that won't die

    - by holden
    I've got a few ruby gems that won't go away. I think it has to do with when I installed them. Occasionally I have forgotten to use "sudo" before doing a gem install, which results in a write error and from what I can gather puts a copy of the gem in my user directory instead of somewhere it can run. But gem uninstall doesn't work. It continually shows up in 'gem list' but can't uninstall it from either gem uninstall, or sudo gem uninstall. I tried directly deleting one gem after finding the path in my 'gem environment', but that still left the gem on the list. Also is it possible just to remove all gems and start from scratch? These are driving me nuts. I'm running OS X. Thanks,

    Read the article

  • What can I expect as the core stack for Rails 3.0 and what will I need to include now as a plugin

    - by DJTripleThreat
    So Rails and Merb are sort of merging in Rails 3.0? Thats how its been described to me anyway. This means that a lot of what made Rails, Rails will now be moved to plug-ins so that it can be more lightweight. HOwever, what are those plug-ins going to be and as a new Rails developer, what are THE must have - and also more mature - plug-ins that a Rails developer should install? Some good examples I can think of might be will_paginate, ruby_prof or sqlite3-ruby.

    Read the article

  • Require a specific version of ActiveRecord

    - by magnushjelm
    I have both Rails 2.3.4 and Rails 3.0.0.beta installed on my local machine. I am using ActiveRecord in a stand alone ruby script and when I do require 'active_record' 3.0.0.beta is loaded. How can I force it to require 2.3.4 instead? (without uninstalling 3.0.0.beta)

    Read the article

  • Using Gems with MacRuby

    - by Craig Williams
    How do you use gems from a MacRuby .5 application on Snow Leopard? Do I need to specify the gem path? If so, how do I do this? Best scenario is to package the gems inside the application so the user would not have to install them when the app is distributed.

    Read the article

  • In Ruby, how to I read memory values from an external process?

    - by grg-n-sox
    So all I simply want to do is make a Ruby program that reads some values from known memory address in another process's virtual memory. Through my research and basic knowledge of hex editing a running process's x86 assembly in memory, I have found the base address and offsets for the values in memory I want. I do not want to change them; I just want to read them. I asked a developer of a memory editor how to approach this abstract of language and assuming a Windows platform. He told me the Win32API calls for OpenProcess, CreateProcess, ReadProcessMemory, and WriteProcessMemory were the way to go using either C or C++. I think that the way to go would be just using the Win32API class and mapping two instances of it; One for either OpenProcess or CreateProcess, depending on if the user already has th process running or not, and another instance will be mapped to ReadProcessMemory. I probably still need to find the function for getting the list of running processes so I know which running process is the one I want if it is running already. This would take some work to put all together, but I am figuring it wouldn't be too bad to code up. It is just a new area of programming for me since I have never worked this low level from a high level language (well, higher level than C anyways). I am just wondering of the ways to approach this. I could just use a bunch or Win32API calls, but that means having to deal with a bunch of string and array pack and unpacking that is system dependant I want to eventually make this work cross-platform since the process I am reading from is produced from an executable that has multiple platform builds, (I know the memory address changes from system to system. The idea is to have a flat file that contains all memory mappings so the Ruby program can just match the current platform environment to the matching memory mapping.) but from the looks of things I'll just have to make a class that wraps whatever is the current platform's system shared library memory related function calls. For all I know, there could already exist a Ruby gem that takes care of all of this for me that I am just not finding. I could also possibly try editing the executables for each build to make it so whenever the memory values I want to read from are written to by the process, it also writes a copy of the new value to a space in shared memory that I somehow have Ruby make an instance of a class that is a pointer under the hood to that shared memory address and somehow signal to the Ruby program that the value was updated and should be reloaded. Basically a interrupt based system would be nice, but since the purpose of reading these values is just to send to a scoreboard broadcasted from a central server, I could just stick to a polling based system that sends updates at fixed time intervals. I also could just abandon Ruby altogether and go for C or C++ but I do not know those nearly as well. I actually know more x86 than C++ and I only know C as far as system independent ANSI C and have never dealt with shared system libraries before. So is there a gem or lesser known module available that has already done this? If not, then any additional information as to how to accomplish this would be nice. I guess, long story short, how do I do all this? Thanks in advance, Grg PS: Also a confirmation that those Win32API calls should be aimed at the kernel32.dll library would be nice.

    Read the article

  • Ruby SerialPorts

    - by Seth Archer
    I'm using the ruby serial port gem. After I open up the port I send the data I want like this. sp.write [200.chr, 30.chr, 7.chr, 5.chr, 1.chr, 2.chr, 0.chr, 245.chr].to_s It doesn't work, but if I put it in a loop of around 200 times: 200.times do sp.write [200.chr, 30.chr, 7.chr, 5.chr, 1.chr, 2.chr, 0.chr, 245.chr].to_s end It works. Any ideas on why this is happening?

    Read the article

  • Installing and using acts-as-taggable-on

    - by seaneshbaugh
    This is going to be a really dumb question, I just know it, but I'm going to ask anyways because it's driving me crazy. How do I get acts-as-taggable-on to work? I installed it as a gem with gem install acts-as-taggable-on because I can't ever seem to get installing plugins to work, but that's a whole other batch of questions that are all probably really dumb. Anyways, no problems there, it installed correctly. I did ruby script/generate acts_as_taggable_on_migration and rake db:migrate, again no problems. I added acts_as_taggable to the model I want to use tags with, started up the server and then loaded the index for the model just to see if what I've got so far is working and got the following error: undefined local variable or method `acts_as_taggable' for #. I figure that just means I need to do something like require 'acts-as-taggable-on' to my model's file because that's typically what's necessary for gems. So I did that hit refresh and got uninitialized constant ActiveRecord::VERSION. I'm not even going to pretend to begin to know what that means went wrong. Did I go wrong somewhere or there something else I need to do. The installation instructions seem to me like they just assume you generally know what you're doing and don't even begin to explain what to do when things go wrong.

    Read the article

  • Cannot install Curb gem on Netbeans 6.9 R2

    - by Zeck
    Hi guys, I'm trying to install feedzirra. When i install curb on my netbeans i get following errors. Building native extensions. This could take a while... ERROR: Error installing curb-0.7.6.gem: ERROR: Failed to build gem native extension. "C:/Program Files/NetBeans 6.9 RC2/ruby/jruby-1.5.0/bin/jruby.bat.exe" extconf.rb '"C:/Program Files/NetBeans 6.9 RC2/ruby/jruby-1.5.0/bin/jruby.bat.exe"' is not recognized as an internal or external command, operable program or batch file. Gem files will remain installed in C:/Program Files/NetBeans 6.9 RC2/ruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/curb-0.7.6 for inspection. Results logged to C:/Program Files/NetBeans 6.9 RC2/ruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/curb-0.7.6/ext/gem_make.out Any ideas how I can get this to work? Or did you know very fast feed parser gem?

    Read the article

  • Why do you have to explicitly specify scope with friendly_id?

    - by nfm
    I'm using the friendly_id gem. I also have my routes nested: # config/routes.rb map.resources :users do |user| user.resources :events end So I have URLs like /users/nfm/events/birthday-2009. In my models, I want the event title to be scoped to the username, so that both nfm and mrmagoo can have events birthday-2009 without them being slugged. # app/models/event.rb def Event < ActiveRecord::Base has_friendly_id :title, :use_slug => true, :scope => :user belongs_to :user ... end I'm also using has_friendly_id :username in my User model. However, in my controller, I'm only pulling out events pertinent to the user who is logged in (current_user): def EventsController < ApplicationController def show @event = current_user.events.find(params[:id]) end ... end This doesn't work; I get the error ActiveRecord::RecordNotFound; expected scope but got none. # This works @event = current_user.events.find(params[:id], :scope => 'nfm') # This doesn't work, even though User has_friendly_id, so current_user.to_param _should_ return "nfm" @event = current_user.events.find(params[:id], :scope => current_user) # But this does work! @event = current_user.events.find(params[:id], :scope => current_user.to_param) SO, why do I need to explicitly specify :scope if I'm restricting it to current_user.events anyway? And why does current_user.to_param need to be called explicitly? Can I override this?

    Read the article

  • Unable to have nokogiri obey custom path parameters during install

    - by Christopher
    I am trying to install nokogiri locally on dreamhost using the commands: $ wget ftp://xmlsoft.org/libxml2/libxml2-2.7.6.tar.gz $ wget ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz $ tar zxvf libxml2-2.7.6.tar.gz $ cd libxml2-2.7.6 $ ./configure --prefix=$HOME/local/ --exec-prefix=$HOME/local $ make && make install $ cd .. $ tar zxvf libxslt-1.1.26.tar.gz $ cd libxslt-1.1.26 $ ./configure --prefix=$HOME/local/ --with-libxml-prefix=$HOME/local/ $ make && make install $ export LD_LIBRARY_PATH=$HOME/local/lib $ gem install nokogiri -- --with-xslt-dir=$HOME/local \ --with-xml2-include=$HOME/local/include/libxml2 \ --with-xml2-lib=$HOME/local/lib but it still gives the error: Building native extensions. This could take a while... ERROR: Error installing nokogiri: ERROR: Failed to build gem native extension. /usr/bin/ruby1.8 extconf.rb checking for iconv.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2,/usr/include,/usr/include/libxml2... yes checking for libxml/parser.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2,/usr/include,/usr/include/libxml2... yes checking for libxslt/xslt.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2,/usr/include,/usr/include/libxml2... no libxslt is missing. try 'port install libxslt' or 'yum install libxslt-devel' *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/bin/ruby1.8 --with-iconv-dir --without-iconv-dir --with-iconv-include --without-iconv-include=${iconv-dir}/include --with-iconv-lib --without-iconv-lib=${iconv-dir}/lib --with-xml2-dir --without-xml2-dir --with-xml2-include --without-xml2-include=${xml2-dir}/include --with-xml2-lib --without-xml2-lib=${xml2-dir}/lib --with-xslt-dir --without-xslt-dir --with-xslt-include --without-xslt-include=${xslt-dir}/include --with-xslt-lib --without-xslt-lib=${xslt-dir}/lib Gem files will remain installed in /home/myusername/.gems/gems/nokogiri-1.4.1 for inspection. Results logged to /home/myusername/.gems/gems/nokogiri-1.4.1/ext/nokogiri/gem_make.out where it doesn't seem to be looking in the paths I have specified for the libraries. Is there something wrong with my installation method?

    Read the article

  • Ruby Gems Either/Or Dependency?

    - by Myron
    My VCR gem currently depends on FakeWeb. I have it declared as a dependency in my gemspec. I'm working with the auther of WebMock (a library that provides similar functionality to FakeWeb) to get VCR to work with WebMock as well, so that users of VCR could use either FakeWeb or WebMock as the http stubbing library. When it comes time to release the next version of VCR, I'm not sure of the best way to handle these dependencies. VCR will depend on either WebMock, or FakeWeb (but doesn't need both), and will have certain version requirements for both. I could add both as dependencies to my gemspec, but when you use bundler, it bundles all gem dependencies--so both FakeWeb and Webmock will get bundled with the application. I've been thinking that maybe I won't declare either gem as a dependency, and check for the presence of either library at run-time (along with checking the version), and give the user a helpful error message if neither is present at a supported version. But I'm not really sure I like this approach either. Does anyone have a suggestion for the best way to handle an either/or gem dependency? Thanks!

    Read the article

  • Unpacking gems [Rails 2.3.5]

    - by yuval
    I have the following gems defined in my environment.rb file: config.gem "authlogic" config.gem "paperclip" config.gem "pauldix-feedzirra", :lib => "feedzirra", :source => "http://gems.github.com" config.gem 'whenever', :lib => false, :source => 'http://gemcutter.org/' I have them installed on my local computer and everything is working well. Since I am working on a shared-server (DreamHost), I need to unpack those gems to get them to work (can't install them as I did on my own computer to get them to work). Before uploading, I ran the following on my local machine: rake gems:unpack This created the following folders in /vender/gems: authlogic-2.1.3, paperclip-2.3.1.1, pauldix-feedzirra-0.0.18, whenever-0.4.1 So it looks like they're all there. When I run rake db:migrate on the server, though, I get these following error: Missing these required gems: pauldix-feedzirra For some reason, the feedzirra unpacked gem is not detected. Could anybody give me a clue as to why this is happening and how to solve it? Thanks!

    Read the article

  • A copy of ApplicationController has been removed from the module tree but is still active

    - by Matchu
    Whenever two concurrent HTTP requests go to my Rails app, the second always returns the following error: A copy of ApplicationController has been removed from the module tree but is still active! From there it gives an unhelpful stack trace to the effect of "we went through the standard server stuff, ran your first before_filter on ApplicationController (and I checked; it's just whichever filter runs first)", then offers the following: /home/matchu/rails/torch/vendor/rails/activesupport/lib/active_support/dependencies.rb:414:in `load_missing_constant' /home/matchu/rails/torch/vendor/rails/activesupport/lib/active_support/dependencies.rb:96:in `const_missing' which I'm assuming is a generic response and doesn't really say much. Google seems to tell me that people developing Rails Engines will encounter this, but I don't do that. All I've done is upgrade my Rails app from 2.2 (2.1?) to 2.3. What are some possible causes for this error, and how can I go about tracking down what's really going on? I know this question is vague, so would any other information be helpful? More importantly: I tried doing a test run in a "production" environment just now, and the error doesn't seem to persist. Does this only affect development, then, and need I not worry too much?

    Read the article

  • test_case files in rails components

    - by Joseph Misiti
    i noticed there are a bunch of test_case.rb files delivered in the rails components: ./actionmailer-2.3.5/lib/action_mailer/test_case.rb ./actionpack-2.3.5/lib/action_controller/test_case.rb ./actionpack-2.3.5/lib/action_view/test_case.rb ./activerecord-2.3.5/lib/active_record/test_case.rb ./activesupport-2.3.5/lib/active_support/test_case.rb i am wondering how to execute these files. I cant seem to figure out how to do it?

    Read the article

  • How to install ferret gem on Windows 7 ?

    - by Rav
    Hi, I was trying to run an OpenSource project which requires ferret to be installed. While installing it using gem install ferret, it's giving this error - Building native extensions. This could take a while... ERROR: Error installing ferret: ERROR: Failed to build gem native extension. C:/Ruby/bin/ruby.exe extconf.rb creating Makefile nmake 'nmake' is not recognized as an internal or external command, operable program or batch file. Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/ferret-0.11.6 for inspection. Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/ferret-0.11.6/ext/gem_make.out So, I tried installing nmake (nmake15.exe), but the one I could find. It does not installs on Windows 7.Please help. How can I install ferret ? Thanks so much.

    Read the article

  • Rails Custom Plugin/Gem with Partials

    - by Jason
    I am writing a gem which provides helpers for views. The HTML I want to insert via the helper is complex enough that I'd rather write it in a _partial.html.erb file. How do I get the gem's view path include in the application's load_path? Note: the only gem I've found that does something like this is Devise. When a view cannot be found, Rails prints the load path which (on my machine) looks like: Missing partial sortable_nested_set/tree with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml], :formats=>[:html], :locale=>[:en, :en]} in view paths "/home/jason/VirtualRestaurant3/app/views", "/home/jason/.rvm/gems/ruby-1.9.2-preview3/gems/devise-1.1.rc0/app/views" How does Devise do it? My gem: http://github.com/jrmurad/SortableNestedSet Devise gem: +http://+github.com/plataformatec/devise

    Read the article

  • How install gems locally?

    - by metdos
    I have no internet connection on server machine, so I need to install gems locally. I tried gem install rails-2.3.4.gem But, I'm getting errors. How Can I install gems locally. Thanks.

    Read the article

  • How to override a class method of the gem in rails Application ?

    - by Srinivas Iyer
    Hi, Best practice to Override a class method of the gem in rails Application . I need to override the behaviour of the find method of a gem. following is the code in the gem module Youtube class display attr_accessor :base def find(id, options = {}) detailed = convert_to_number(options.delete(:detailed)) options[:detailed] = detailed unless detailed.nil? base.send :get, "/get_youtube", options.merge(:youtube_id => id) end end end How do i override the above find method in my YoutubeSearch Controller of Rails Application ? def find(id, options = {}) //Code here end Thanks

    Read the article

  • Using Thor for generators in a Ruby Gem

    - by David Burrows
    How do I setup a Gem to have a binary command eg. "project newProject" that uses Thor's set of generator commands to create files etc.? A good answer would describe how to layout the skeleton of a gem that that when run from the command line "project newProject" creates 1 file named "newProject.txt" in the directory it's run from. I've seen that Rails 3 is using Thor to power it's generators, seems like a really good solution and i'd like to use a similar approach in non-Rails ruby gem i'm working on. Tried looking at the Rails 3 source but it's a bit labyrinthine hence the question.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >