Search Results

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

Page 12/22 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • How can I abstract out the core functionality of several Rails applications?

    - by hornairs
    I'd like to develop a number of non-trivial Rails applications which all implement a core set of functionality but each have certain particular customizations, extensions, and aesthetic differences. How can I pull the core functionality (models, controllers, helpers, support classes, tests) common to all these systems out in such a way that updating the core will benefit every application based upon it? I've seen Rails Engines but they seem to be too detached, almost too abstracted to be built upon. I can seem them being useful for adding one component to an existing app, for example bolting on a blog engine to your existing e-commerce site. Since engines seem to be mostly self contained, it seems difficult and inconvenient to override their functionality and views while keeping DRY. I've also considered abstracting the code into a gem, but this seems a little odd. Do I make the gem depend on the Rails gems, and the define models & controllers inside it, and then subclass them in my various applications? Or do I define many modules inside the gem that I include in the different spots inside my various applications? How do I test the gem and then test the set of customizations and overridden functionality on top of it? I'm also concerned with how I'll develop the gem and the Rails apps in tandem, can I vendor a git repository of the gem into the app and push from that so I don't have to build a new gem every iteration? Also, are there private gem hosts/can I set my own gem source up? Also, any general suggestions for this kind of undertaking? Abstraction paradigms to adhere to? Required reading? Comments from the wise who have done this before? Thanks!

    Read the article

  • How to use gems not in a Gemfile when working with bundler?

    - by arikfr
    When using bundler with a project in general and Rails specifically, you have access only to gems defined in your Gemfile. While this makes sense, it can be limiting. Mostly I find it limiting when I want to use a certain RSpec formatter that the rest of the team doesn't use. Unless it's in the Gemfile, it isn't accessible. Any way around it or I have to add it to Gemfile? Update: my problem wasn't Bundler but Spork. When running RSpec without Spork I had no problem of using whatever formatter I wanted.

    Read the article

  • Improve Efficiency in Array comparison in Ruby

    - by user2985025
    Hi I am working on Ruby /cucumber and have an requirement to develop a comparison module/program to compare two files. Below are the requirements The project is a migration project . Data from one application is moved to another Need to compare the data from the existing application against the new ones. Solution : I have developed a comparison engine in Ruby for the above requirement. a) Get the data, de duplicated and sorted from both the DB's b) Put the data in a text file with "||" as delimiter c) Use the key columns (number) that provides a unique record in the db to compare the two files For ex File1 has 1,2,3,4,5,6 and file2 has 1,2,3,4,5,7 and the columns 1,2,3,4,5 are key columns. I use these key columns and compare 6 and 7 which results in a fail. Issue : The major issue we are facing here is if the mismatches are more than 70% for 100,000 records or more the comparison time is large. If the mismatches are less than 40% then comparison time is ok. Diff and Diff -LCS will not work in this case because we need key columns to arrive at accurate data comparison between two applications. Is there any other method to efficiently reduce the time if the mismatches are more thatn 70% for 100,000 records or more. Thanks

    Read the article

  • What jquery rails 3 tutorial has worked well for you?

    - by finneycanhelp
    Hi! I have looked at several tutorials involving rails 3 and jquery. The tutorial at http://www.blog.bridgeutopiaweb.com/post/how-to-use-jquery-for-rails-3/ looked promising. However, I get the errors of document.on is not a function and $("a[data-remote=true]").livequery is not a function I get the feeling that I should look at another tutorial or just use jquery raw and not install a ruby gem for jquery. Any advice? Thanks!

    Read the article

  • Can I use RVM to maintain a single version of Ruby for all users?

    - by Trevor Burnham
    I love RVM. I realize that the main use case for it is letting different users switch between different versions of Ruby. But let's say I'm deploying a Rails app to a server and I just want a single version of Ruby running. In particular, I want 1.9.2, which is a breeze to install with RVM but a pain without it. Is there a way that I can say "I want this to be the canonical Ruby installation for all users" (along with all of its gems) without having to create a bunch of symlinks by hand and change them every time I update to a newer Ruby release?

    Read the article

  • can't get pingfm class work (ruby)

    - by Radek
    I have simple code from Ping.fm Ruby Client/Library require 'pingfm' pingfm = Pingfm::Client.new('api_key', 'user_app_key') but it gives me uninitialized constant Pingfm (NameError) pingfm gem is installed, just there was this error message Could not find main page README during installation. Any idea how I can get it work? I am using: ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] pingfm (1.0.2)

    Read the article

  • Missing Required Gems - javan-whenever and cron job in rails

    - by Matenia Rossides
    Hi, I have finally managed to get javan-whenever gem working on my site5 server, and updating the crontab is quite easy, however whenever a cron job is run with the code that is generated, i get a "missing required gems" error where it lists about 8/10 of my gems. Has anyone else had this problem? If so, what would the solution be. The funny thing is that when it outputs where my gems are, this is all correct, and the gems are loading fine from within my application. Cheers, Matenia

    Read the article

  • How/When/Where to Extend Gem Classes (via class_eval and Modules) in Rails 3?

    - by viatropos
    What is the recommended way to extend class behavior, via class_eval and modules (not by inheritance) if I want to extend a class buried in a Gem from a Rails 3 app? An example is this: I want to add the ability to create permalinks for tags and categories (through the ActsAsTaggableOn and ActsAsCategory gems). They have defined Tag and Category models. I want to basically do this: Category.class_eval do has_friendly_id :title end Tag.class_eval do has_friendly_id :title end Even if there are other ways of adding this functionality that might be specific to the gem, what is the recommended way to add behavior to classes in a Rails 3 application like this? I have a few other gems I've created that I want to do this to, such as a Configuration model and an Asset model. I would like to be able to add create an app/models/configuration.rb model class to my app, and it would act as if I just did class_eval. Anyways, how is this supposed to work? I can't find anything that covers this from any of the current Rails 3 blogs/docs/gists.

    Read the article

  • What's a good way to set up a development environment on OS X for ruby, rails, and git?

    - by Ein2015
    I'm going to start development on a web app using ruby, rails, probably either postgres or mysql, and most likely apache. I'll be using a git repository with the master repo on another server. I've searched through stackoverflow and done some Googling... so here's what I have so far... What are your opinions on what's described on this page?: http://robots.thoughtbot.com/post/159805668/2009-rubyists-guide-to-a-mac-os-x-development What about this one?: http://www.buildingwebapps.com/articles/79197-setting-up-rails-on-leopard-mac I don't need helping finding an editor, there's plenty out there (TextMate, TextWrangler, MacVim), but I do need help to make sure I'm setting things up correctly to code, build, and run the web app from my mac. Here's a specific set of scenarios I could use some help on: Testing various versions of rails and/or ruby. Testing performance, vulnerabilities, monitoring queries, etc. Testing different versions of gems. Working on other projects on this same machine.

    Read the article

  • Ruby On Rails CMS Framework

    - by stel
    Hi! I want to create a framework fo rails application. It will be a rails application but packed into gem (like a Radiant CMS). It must work like this: gem install cmsframework and then: cmsframework the_app After that we have a sceleton of rails app without any controllers etc.. - all controllers loaded from cmsframework gem. If I want to rewrite some files (for example public/styles.css) I must simply create it in my app (the_app). If I want new functions in my app I can create a plugin. But the main functionalities must be loaded from cmsframework gem. What is the best way to implement this?

    Read the article

  • How do I use Haml in a view in my new plugin?

    - by Eric
    I'm creating a new plugin for a jruby on rails application that will eventually be turned into a gem. Inside my plugin I have controllers, helpers and views. For my views I'd like to use Haml. The problem is that I can't seem to get it to recognize that they are haml templates. Is it even possible to do this? Is there a way for a plugin to have Haml as a dependency for its view? And by that I mean, I intend for the plugin that I'm creating to have a view created by the plugin, that can be used by the application developer. for example: vendor/ plugins/ my_plugin/ lib/ app/ views/ my_plugin_demo/ index.haml.html controllers/ my_plugin_demo_controller.rb helpers/ In my plugin's init.rb, I tried: require 'my_plugin' require 'haml' #doesn't seem to make a difference :( but that didn't seem to make any difference. Has anybody had any experience with this? I can't seem to find any documentation on how to make this work. Are plugin views restricted to .erb templates?

    Read the article

  • How to use these ruby based CSS stylsheet frameworks languages?

    - by metal-gear-solid
    I read about many CSS related languages and tools which need ruby. What is the purpose of these languages and tool how these can save time and improve our CSS coding. What is the role in ruby language in these languages and tool. Will i have to install and learn ruby language to use these languages and tool. will i need ruby installed on webserver where website will be hosted. I'm talking abut these languages http://lesscss.org/ http://sass-lang.com/ http://compass-style.org/ some mentioned here: http://www.ruby-toolbox.com/categories/css_frameworks.html I'm on Windows XP PC , How can i use these Ruby based languages and which is preferred? I don't know ruby language.

    Read the article

  • Missing the Rails 2.3.4 gem. Even though it's installed!

    - by Shereef
    Running Snow Leopard. Tried uninstalling, and re-installing. Still getting the same error whenever I run a rake task. mbpro:redmine shereef$ ruby -v ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.0.0] mbpro:redmine shereef$ rails -v Rails 2.3.4 mbpro:redmine shereef$ which rails /usr/local/bin/rails mbpro:redmine shereef$ gem -v 1.3.5 mbpro:redmine shereef$ which gem /usr/local/bin/gem mbpro:redmine shereef$ rake -v (in /Users/shereef/Documents/Code/BetterMeans/redmine) Missing the Rails 2.3.4 gem. Please gem install -v=2.3.4 rails, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed. mbpro:redmine shereef$ which rake /usr/bin/rake mbpro:redmine shereef$ $PATH -bash: /usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin: No such file or directory mbpro:redmine shereef$

    Read the article

  • gems, bundle command, and ruby not found in new terminal window

    - by user3579987
    So I installed ruby with rvm, ran a bundle install and installed a bunch of gems, etc. It all works just fine in the original terminal window I did all of this in but I opened up a new terminal window and now I'm getting errors like bundle: command not found and gem command not found. I tried doing a symbolic link for the gem command but then when I do gem list it displays a much shorter list of my local gems and not at all the ones I need for bundle install. Is there something I need to do to configure bash or rvm so that it recognizes that I did indeed install all the gems I have installed? name@crunchbang:~/ug_research_portal$ which gem /home/name/.rvm/rubies/ruby-2.1.1/bin/gem name@crunchbang:~/ug_research_portal$ which ruby /home/name/.rvm/rubies/ruby-2.1.1/bin/ruby And in ~/.bashrc: GEM_HOME="/home/name/.rvm/gems/ruby-2.1.1" GEMGLOBAL_HOME="/home/ name/.rvm/gems/ruby-2.1.1@global" export PATH=$PATH:$GEM_HOME/bin:$GEMGLOBAL_HOME/bin:$HOME/.rvm/bin Edit: Looks like my $PATH is somehow wrong? bash: /home/name/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/name/.rvm/gems/ruby-2.1.1/bin:/home/name/.rvm/gems/ruby-2.1.1@global/bin:/home/name/.rvm/bin/: No such file or directory which is odd since ls for /home/name/.rvm/bin and /home/name/.rvm/gems/ruby-2.1.1@global/bin and /home/name/.rvm/gems/ruby-2.1.1/bin work just fine Psych, I was just doing $PATH instead of echo "$PATH" which was giving me the No such file or directory error. The original problem still stands though.

    Read the article

  • Are there any Simple and Clean Methods to implement Maps (Google or otherwise) in RoR 3?

    - by Port3M5
    I'm looking into building a group work app for my final year project next year. One of the core parts is organising group meetings. I plan to make this as powerful as possible and adding a map can help get rid of excuses such as "I didn't know where it was". I have been unable to find any simple solutions to embed maps into my Rails apps so far. An important issue is I need Rails 3 Compatibility. What are your suggestions? Gems, plugins or even something totally different?

    Read the article

  • Mechanize form submit not going to the correct response page, no errors as to why. Something I'm doing?

    - by Zack Shapiro
    I threw this all in one controller for testing purposes. My code fills out the form correctly for adding a new address to your Amazon account. There are two buttons that submit this form, one takes you to add a new address which is what I don't want, and the other is just a Save & Continue input/image. When I submit the form via that button, as I do below, the form is still on the page, filled out as I have with my code. Inspecting the page titles, they're the same. There are no discernible errors that Mechanize or Amazon spit back. Any ideas? class AmazonCrawler def initialize @agent = Mechanize.new do |agent| agent.user_agent_alias = 'Mac Safari' agent.follow_meta_refresh = true agent.redirect_ok = true end end def login # login_url = "https://www.amazon.com/ap/signin?_encoding=UTF8&openid.assoc_handle=usflex&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0&openid.pape.max_auth_age=0&openid.return_to=https%3A%2F%2Fwww.amazon.com%2Fgp%2Fcss%2Fhomepage.html%3Fie%3DUTF8%26ref_%3Dgno_yam_ya" login_url = "https://www.amazon.com/gp/css/account/address/view.html?ie=UTF8&ref_=ya_add_address&viewID=newAddress" @agent.get(login_url) form = @agent.page.forms.first form.email = "[email protected]" form.radiobuttons.first.value = "0" form.radiobuttons.last.check form.password = "my_password" dashboard = @agent.submit(form) end end class UsersController < ApplicationController def index response = AmazonCrawler.new.login form = response.forms[1] # fill out form form.enterAddressFullName == "Your Name" form.enterAddressAddressLine1 = "123 Main Street" form.enterAddressAddressLine2 = "Apartment 34" form.enterAddressCity = "San Francisco" form.enterAddressStateOrRegion = "CA" form.enterAddressPostalCode = "94101" form.enterAddressPhoneNumber = "415-555-1212" form.AddressType = "RES" new_response = form.submit( form.button_with(value: /Save.*Continue/) ) end end

    Read the article

  • How do (or can I) hack a gem temporarily while looking for a bug?

    - by Tom Andersen
    I have a gem installed in my home directory on a laptop (eg not THE server). I have installed ruby 1.9.1 and also some other gems, notably right_aws - which allows access to s3, etc with ruby. All works, except there is a bug when I do a query on SimpleDB, and the returned list of items includes an item with any two byte utf-8 character in its itemName(). So I look through the sources of the right_aws gem installed on my machine, and I can see some places where I would like to test a fix. If I edit the file, save changes, (needing a password), then restart the server (script/server), it ignores my changes. I am quite new at ruby - do you have to 'compile' or other similar move to get the source code changes made take effect? I can see the edited file is changed by viewing it in terminal, etc.

    Read the article

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