Search Results

Search found 13929 results on 558 pages for 'ruby on rails plugins'.

Page 21/558 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • Recording Audio through RTMP/Rails

    - by Lowgain
    I am in the process of building a rails/flex application which requires audio to be recorded and then stored in our amazon s3 account. I have found no alternative to using some form of RTMP server for recording audio through flash, but our hosting environment will not allow us to install anything like FMS, Red5, etc. Is there any existing Ruby/Rails RTMP solution that will allow audio recording? If not, is it possible for Rails to at least intercept the RTMP stream and then I can hope to reference red5 or something for parsing the data (long shot, I know)? The other alternative I can think of is hosting a red5 server on another host and communicating with our rails app once the saving/uploading is done, which is not preferred. Am I going to have any luck here?

    Read the article

  • Rails 3 functional optionally testing caching

    - by Stephan
    Generally, I want my functional tests to not perform action caching. Rails seems to be on my side, defaulting to config.action_controller.perform_caching = false in environment/test.rb. This leads to normal functional tests not testing the caching. So how do I test caching in Rails 3. The solutions proposed in this thread seem rather hacky or taylored towards Rails 2: How to enable page caching in a functional test in rails? I want to do something like: test "caching of index method" do with_caching do get :index assert_template 'index' get :index assert_template '' end end Maybe there is also a better way of testing that the cache was hit?

    Read the article

  • rails application on production not working

    - by Steven
    i have a rails application on production which is running using mongrel, I can successfully start the mogrel for the application but when i try to access the application on the URL it is not responding... it is just hanging. This is the mongrel log... but when I hit xxx.xxx.xxx.xx:3001 it is not showing the website but on developent is working fine. ** Starting Mongrel listening at 0.0.0.0:3001 ** Initiating groups for "name.co.za":"name.co.za". ** Changing group to "name.co.za". ** Changing user to "name.co.za". ** Starting Rails with production environment... ** Rails loaded. ** Loading any Rails specific GemPlugins ** Signals ready. TERM = stop. USR2 = restart. INT = stop (no restart). ** Rails signals registered. HUP = reload (without restart). It might not work well. ** Mongrel 1.1.5 available at 0.0.0.0:3001 ** Writing PID file to /home/name.co.za/shared/log/mongrel.pid

    Read the article

  • appending <a href> to keywords in rails

    - by kim
    Basically, there are some keywords that i want to pick out and assign a link to them dynamically. How should i go about in doing this? Let's say i have something like this; <p>ruby, rails, php, python, django and sinatra</p> and i would like to assign links to keywords like ruby and python, so the end results should look like this; <p><a href="http://www.ruby-lang.org">ruby</a>, rails, php, <a href="http://www.python.org">python</a>, django and sinatra</p> Any help or suggestion would be much appreciated!

    Read the article

  • Why is RSpec so slow under Rails?

    - by Adrian Dunston
    Whenever I run rspec tests for my Rails application it takes forever and a day of overhead before it actually starts running tests. Why is rspec so slow? Is there a way to speed up Rails' initial load or single out the part of my Rails app I need (e.g. ActiveRecord stuff only) so it doesn't load absolutely everything to run a few tests?

    Read the article

  • emacs-rails vs rinari??

    - by nimms
    Hi all, I'm just coming back to rails coding after a long hiatus. I was using rinari previously but noticed that there's a new version of emacs-rails. Is anyone using either?? Any preferences for one over the other?? What are people using for their rails projects within emacs these days??

    Read the article

  • May we have Ruby and Rails performance statistics? We're persuading the business to use Rails!

    - by thekingoftruth
    We're convincing our Products officer that we want to use JRuby on Rails, and we're having a hard time coming up with some statistics which show that: Coding time is less using Rails vs. say Struts or Zend Framework or what have you. Ruby (and JRuby in particular) performance isn't horrible (anymore). Rails performance isn't bad either. If you can get us some good stats quickly, we might have a chance!

    Read the article

  • Running Rails as an embedded app inside of a gem

    - by randombits
    I'm trying to understand what exactly the above (in my question's Title) means? This is taken directly from the SpreeCommerce.com project: If you’re an experienced Rails developer you may be wondering where your app directory is. Spree actually runs as an embedded Rails app inside of your gem. How do you customize things then? We’ll cover that later in extensions. Source: http://spreecommerce.com/documentation/getting_started.html Can someone further explain what exactly it means when a Rails app is run "inside of your gem"

    Read the article

  • Error when loading YAML config files in Rails

    - by ZelluX
    I am configuring Rails with MongoDB, and find a strange problem when paring config/mongo.yml file. config/mongo.yml is generated by executing script/rails generate mongo_mapper:config, and it looks like following: defaults: &defaults host: 127.0.0.1 port: 27017 development: <<: *defaults database: tc_web_development test: <<: *defaults database: tc_web_test From the config file we can see the objects development and test should both have a database field. But when it is parsed and loaded in config/initializers/mongo.db, config = YAML::load(File.read(Rails.root.join('config/mongo.yml'))) puts config.inspect MongoMapper.setup(config, Rails.env) the strange thing comes: the output of puts config.inspect is {"defaults"=>{"host"=>"127.0.0.1", "port"=>27017}, "development"=>{"host"=>"127.0.0.1", "port"=>27017}, "test"=>{"host"=>"127.0.0.1", "port"=>27017}} which does not contain database attribute. But when I execute the same statements in a plain ruby console, instead of using rails console, mongo.yml is parsed in a right way. {"defaults"=>{"host"=>"127.0.0.1", "port"=>27017}, "development"=>{"host"=>"127.0.0.1", "port"=>27017, "database"=>"tc_web_development"}, "test"=>{"host"=>"127.0.0.1", "port"=>27017, "database"=>"tc_web_test"}} I am wondering what may be the cause of this problem. Any ideas? Thanks.

    Read the article

  • Rails - any fancy ways to handle 404s?

    - by jyoseph
    I have a rails app I built for an old site I converted from another cms (in a non-rails language, hehe). Most of the old pages are mapped to the new pages using routes.rb. But there are still a few 404s. I am a rails newb so I'm asking if there are any advanced ways to handle 404s. For example, if I was programming in my old language I'd do this: Get the URL (script_name) that was being accessed and parse it. Do a lookup in the database for any keywords, ids, etc found in the new URL. If found, redirect to the page (or if multiple records are found, show them all on a results page and let user choose). With rails I'd probably want to do :status = :moved_permanently I'm guessing? If not found, show a 404. Are there any gems/plugins or tutorials you know of that would handle such a thing, if it's even possible. Or can you explain on a high level how that can be done? I don't need a full code sample, just a push in the right direction. PS. It's a simple rails 3 app that uses a single Content model.

    Read the article

  • data parsed to database Nokogiri rails

    - by Charlie Allombert
    So I'm just getting started with Nokogiri and Rails I have the following which returns the name of someone. TEST.rb: require 'nokogiri' require 'open-uri' url = "http://www.imdb.com/title/tt1439629/" doc = Nokogiri::HTML(open(url)) puts doc.css("div#wrapper [...too long...]")[0].text Now I created a table in my DB on rails and want to send the returned name to the actor table in the name column! How would I do that ? I can't seem to find atutorial on this... My goal would eventually be to have a rails form where I'd input an IMDB link which would return title and so on... (Also I'm new to ruby rails and programming so please provide easy info!)

    Read the article

  • Rails 3 respond_to: default format?

    - by bdorry
    I am converting a Rails 2 application to Rails 3. I currently have a controller set up like the following: class Api::RegionsController < ApplicationController respond_to :xml, :json end with and an action that looks like the following: def index @regions = Region.all respond_with @regions end The implementation is pretty straightforward, api/regions, api/regions.xml and api/regions.json all respond as you would expect. The problem is that I want api/regions by default to respond via XML. I have consumers that expect an XML response and I would hate to have them change all their URLs to include .xml unless absolutely necessary. In Rails 2 you would accomplish that by doing this: respond_to do |format| format.xml { render :xml => @region.to_xml } format.json { render :json => @region.to_json } end But in Rails 3 I cannot find a way to default it to an XML response. Any ideas?

    Read the article

  • Rails routing issue

    - by Brob
    Hi I've just started learning rails and been going through some tutorials from learning rails (http://www.buildingwebapps.com/podcasts/79335-putting-the-page-contents-into-the) The tutorials appear to be Rails v2 and I'm on Rails v3 There is a line in the routes file which appears to be causing a problem map.view_page ':name', :controller => 'viewer', :action => 'show' The line works for the front end view i.e. my viewer controller but not for the back end I get the error NoMethodError in Viewer#show I think this has something to do with the view I am using and the line <%= @page.body %> I know it's difficult without the full code but if anyone can help that would be awesome

    Read the article

  • Rails BDD with Cucumber: no such file to load -- cucumber-rails

    - by sev
    I have project on Rails (2.3.5). I add into environment.rb same sting: config.gem "cucumber-rails", run "rake gems:unpack:dependencies". Output of "rake gems": [F] cucumber-rails [F] cucumber = 0.6.2 [F] term-ansicolor = 1.0.4 [F] treetop = 1.4.2 [F] polyglot = 0.3.1 [F] polyglot = 0.2.9 [F] builder = 2.1.2 [F] diff-lcs = 1.1.2 [F] json_pure = 1.2.0 When I run "script/generate cucumber" I get Missing these required gems: cucumber-rails Who can help me to fix this?

    Read the article

  • Installing a rails plugin from a Git repository

    - by Daniel Beardsley
    I've been trying to install Shoulda script/plugin install git://github.com/thoughtbot/shoulda.git but all I get is: removing: C:/Documents and Settings/Danny/My Documents/Projects/Ruby On Rails/_ProjectName_/vendor/plugins/shoulda/.git > And the vender/plugins directory is empty. I have Rails 2.1.1 installed as a gem and have verified that 2.1.1 is loaded (using a puts inserted into config/boot.rb). Any ideas about what's going on? (this is on a windows box)

    Read the article

  • Start or ensure that Delayed Job runs when an application/server restarts.

    - by btelles
    Hi there, We have to use delayed_job (or some other background-job processor) to run jobs in the background, but we're not allowed to change the boot scripts/boot-levels on the server. This means that the daemon is not guaranteed to remain available if the provider restarts the server (since the daemon would have been started by a capistrano recipe that is only run once per deployment). Currently, the best way I can think of to ensure the delayed_job daemon is always running, is to add an initializer to our Rails application that checks if the daemon is running. If it's not running, then the initializer starts the daemon, otherwise, it just leaves it be. The question, therefore, is how do we detect that the Delayed_Job daemon is running from inside a script? (We should be able to start up a daemon fairly easily, bit I don't know how to detect if one is already active). Anyone have any ideas? Regards, Bernie Based on the answer below, this is what I came up with. Just put it in config/initializers and you're all set: #config/initializers/delayed_job.rb DELAYED_JOB_PID_PATH = "#{Rails.root}/tmp/pids/delayed_job.pid" def start_delayed_job Thread.new do `ruby script/delayed_job start` end end def process_is_dead? begin pid = File.read(DELAYED_JOB_PID_PATH).strip Process.kill(0, pid.to_i) false rescue true end end if !File.exist?(DELAYED_JOB_PID_PATH) && process_is_dead? start_delayed_job end

    Read the article

  • Get data from html form to ruby in Ruby on Rails

    - by Maestro1024
    Get data from html form to ruby in Ruby on Rails I have some html like this <html> <h1>Text to PDF</h1> <textarea name="comments" cols="40" rows="5"> Enter your Text here... </textarea><br> <input type="submit" value="Submit" /> </form> </body> </html> I want to give the value of the text into the controller for this page/view. How do I do this with rails? I am new to rails, what is the mechanism for this? I don't need to write to the database just want to hand it to the controller. If there is a good tutorial for this sort of thing that would be great, I am not convince I am approaching this correctly.

    Read the article

  • Two threads in a rails initializer file seems to not run them properly

    - by Luccas
    Initially I was using one thread to listen a queue from amazon and works perfectly. aws.rb Thread.new do queue1 = AWS::SQS::Queue.new(SQSADDR['my_queue']) queue1.poll do |msg| ... but now I appended another thread to listen another queue: ... Thread.new do queue2 = AWS::SQS::Queue.new(SQSADDR['my_another_queue']) queue2.poll do |msg| ... and now it seems to not work. Only the last one receives response... I have to join the threads? I can't understand What is going on?

    Read the article

  • How to create view in RoR if skipped during controller generation

    - by swapnesh
    When I run this: rails generate controller hello index it no doubt generates hello controller, but accidentally when I run another command like this: rails generate controller world it creates the world controller successfully, but missed the Route "world/index" like as "hello/index". For this mistake I need to use destroy controller and then generate it once more, is thr some kind of mid way command that I can generate if forgotten something rather than destroying and creating every time. This command rails generate controller contact-us index creates a route as contact_us/index or contact_us after changing routes.rb under config folder. How could I create a more SEO friendly URL in RoR? Like localhost:3000/contact-us? I am working on some very basic rules to follow RoR..like 3 static pages (Home, About us, Contact Us) Just simple html content to understand more, will certainly add more features to it as well. localhost:3000/home localhost:3000/About_us localhost:3000/contact_us I created this via creating home, About_us, contact_us controller command and then changed html in views. Since I am on an initial phase, I read somewhere for static pages we can create this in our public like what we have error pages there in the folder or the approach im using is correct?

    Read the article

  • Ruby on Rails app in root directory?

    - by Chris Leah
    Hey guys, new to rails, but I have found out how to create an app now through the shell but to create an app using rails appname would give me a url of http://url.com/appname/ but I want my app, to be within the route if you understand me, so it's just http://url.com/login/ or /signup or /play so on? So does anyone have any ideas how to do this, or why you can't or I shouldn't? Anything really, thanks guys!

    Read the article

  • Textmate Ruby on Rails Highlighting

    - by yuval
    Hi, I have textmate 1.5.7 running on my leopard machine. When programming in rails, for some reason some key words do not get highlighted. For example: validates_presence_of, has_many, remote_form_for (form_for gets highlighted) etc... I tried switching themes and it did not help. I also tried upgrading to the most recent rails bundle from http://railsbundle.com/ but no cigar. Could someone please help? Thank you very much, Yuval

    Read the article

  • Local install of sqlite3-ruby

    - by Skully
    On my current system i dont have root-access and i want to install sqlite3-ruby. I can compile it and i know how to set custom install-folder, but how does my ruby-installation can recognize/find that installed gem for usage? I tried prefix of my custom RUBYLIB-Folder but that didnt work either. Any suggestions? Thanks skully

    Read the article

  • How to install curl on windows for ruby on rails

    - by Gautam
    Hi, I am new to ruby on rails. Could you please help me to install curl. I have windows 7 and ruby 1.8.7 I need to install Paul Dix's FeedZirra. I need curl for that. Also could you help me with gem install curb. Even curb seems to need Curl Looking forward for your help Thank You Gautam

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >