[Rails] Re: Rails 3 POS Software for touch interface with jQuery
I already use a lot of offline storage, and the interface is completely javascript based (all data is preloaded, and screens are switched via showing/hiding divs). I may have a problem that there is just too much JS in the interface? Could that ever be a problem? thanks for the reply -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/wcx_uMUHkFoJ. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Rails 3 POS Software for touch interface with jQuery
Actually chrome is a fraction faster than firefox, which helps a lot. thanks. It still needs to be faster however, so I will have to keep tweaking it as such. I think we are limited by the speed of the JS engine? In which case there is nothing we can do there. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/xY3AQCX6mhwJ. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] OpenID advice
omniauth + devise gems should do the trick. On Fri, Sep 9, 2011 at 5:49 PM, Leonardo Mateo wrote: > Hi guys, > I have to implement a login using a Google account | Twitter account | > Windows Live account | Facebook account > I've never done this before and I've been researching a bit about the > available gems. > Does anyone has any recommendation for this? This is a Rails 3.1 > application. > I've found: > - openid > - rails_openid > - several active_record_openid with different word combination in > their names but all implies an active record storage. > > I'm not sure if I'll have to use a different gem for each account type > or if I can make it work with only one. > The main goal is to have a User model to be related with other > resources in the application but not to force the user to create > another username/password pair if (s)he prefers to use an already > existent one. > > Any advice will be appreciated. > > Thanks a lot in advance. > > -- > Leonardo Mateo. > There's no place like ~ > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] OpenID advice
Hi guys, I have to implement a login using a Google account | Twitter account | Windows Live account | Facebook account I've never done this before and I've been researching a bit about the available gems. Does anyone has any recommendation for this? This is a Rails 3.1 application. I've found: - openid - rails_openid - several active_record_openid with different word combination in their names but all implies an active record storage. I'm not sure if I'll have to use a different gem for each account type or if I can make it work with only one. The main goal is to have a User model to be related with other resources in the application but not to force the user to create another username/password pair if (s)he prefers to use an already existent one. Any advice will be appreciated. Thanks a lot in advance. -- Leonardo Mateo. There's no place like ~ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Passing arrays between controllers/views
On 10 September 2011 00:41, Toby Rodwell wrote: > What other ways are there to achieve what I am after? One > suggstion I saw was using a session - is that the best way ("the Ruby > way") to pass data between controllers? Any suggstions gratefully > received. If your data is as large as you say, and if you're using cookies for the session store, you'll probably run out of space in there too. So your best bet would be some form of database persistence. Either set the sessions to the DB, or have a "QueryString" object associated to each user (that could allow you to persist their arrays of data across sessions if you wanted to...) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Passing arrays between controllers/views
I have a controller that produces (through its associated 'view' displays summary information of) a number of arrays. On that view page I would like links to other pages, one per array, which shows more detailed information on the array in question. I tried passing the array as a parameter to a link and whilst I think that would have been fine for small arrays for a large array I was getting "URI too large". Since I don't have admin rights to the web server I don't think I can tweak the http buffer settings, and anyway I don't think very long URLs are elegant. What other ways are there to achieve what I am after? One suggstion I saw was using a session - is that the best way ("the Ruby way") to pass data between controllers? Any suggstions gratefully received. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] off topic -- modules in sinatra
First off Apologies for off topic post -- but I figure that more people here will be familiar with sinatra than the general forum and the particular code was adapted from Rails... I need to tweak the sinatra FileStreamer class which is in module Streaming, which is in module Sinatra in sinatra.rb because the data I am sending is derived from a database and I don't know up front what size it is and each has to get blocks of data from the db. (And I *really* don't want to extract it to a file and then send that ;) The problem I have is that I can't figure out how to reference a class that is part of a module? I've tried various things but I can't make it work. I then tried lifting the class out of sinatra.rb but of course it has hooks into module variables etc and anyway I would much rather do this properly. include "sinatra" class Appsupport include Sinatra::Streaming<< Unknown constant ? class DBStreamer < . . . -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: rails 3.1 assets:precompile deployment
I run into the same problem. add this in Capfile: load 'deploy/assets' it will automatically do the deploy_assets task ( assets:precompile ) it will create a link under public directory assets -> $application_path/production/shared/assets/ for this to work you must use: gem 'rails' gem 'sprockets', :git => 'git://github.com/sstephenson/sprockets.git' and in environments/production.rb (otherwise it won't work ) #config.action_dispatch.x_sendfile_header = "X-Sendfile" # Use 'X-Accel-Redirect' for nginx config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" config.assets.compile = true config.assets.digest = true Hope this helps. -- Aldo Nievas SATIO Internet Solutions www.satio.com.ar a...@satio.com.ar M: 54 11 3487 4900 On Fri, Sep 9, 2011 at 5:38 PM, Jim Morris wrote: > I experienced the same thing, although in my case it takes so long to > precompile on my server I don';t know if it ever finishes, waited 15 minutes > one time and it still had not finished. > > My solution was to precompile locally which takes a few seconds, then copy > the public/assets directory to my server. My cap task is... > > > > desc "deploy the precompiled assets" > task :deploy_assets, :except => { :no_release => true } do >run_locally("rake assets:clean && rake precompile") >upload("public/assets", "#{release_path}/public/assets", :via => > :scp, :recursive => true) > end > > Note I don't use the supplied assets:precompile due to a bug in it which > has not yet been released but the task has see the rails bug lists for that. > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-talk/-/ypHmqKHSrPIJ. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: rails 3.1 assets:precompile deployment
I experienced the same thing, although in my case it takes so long to precompile on my server I don';t know if it ever finishes, waited 15 minutes one time and it still had not finished. My solution was to precompile locally which takes a few seconds, then copy the public/assets directory to my server. My cap task is... desc "deploy the precompiled assets" task :deploy_assets, :except => { :no_release => true } do run_locally("rake assets:clean && rake precompile") upload("public/assets", "#{release_path}/public/assets", :via => :scp, :recursive => true) end Note I don't use the supplied assets:precompile due to a bug in it which has not yet been released but the task has see the rails bug lists for that. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/ypHmqKHSrPIJ. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Re: Ajax and rails 3 UJS (jquery)
Gordon Yeong wrote in post #1020881: > Hello, 7stud, > I followed your recommendations and I managed to get good results. > > When I define the return data and then not put any "render" in the > controller action, it works. > > parts_controller.rb extract starts > > # DELETE /parts/1 > # DELETE /parts/1.xml > def destroy > @part = Part.find(params[:id]) > @part.destroy > > respond_to do |format| > format.html { redirect_to(parts_url) } > format.xml { head :ok } > format.js { > @name = 'John Malko' > } > end > end > parts_controller.rb extract ends > > > > --- application.js extract starts > - > $(document).ready(function () { > $('a[data-method="delete"]').live('ajax:success', > function(event, data, textStatus, jqXHR){ > alert(data.name + ' has been deleted'); > }); > }) > --- application.js extract ends > - > Where does your the syntax for the event name 'ajax:success' come from? In prototype you can use the event name 'dom:loaded', although I can't find much information about where that name comes from either, but in any case that is prototype--not jQuery. > Questions: > > > In my case (i'm not definining .js.erb) as all I wanted was to > have > the deleted entries fade out (I defined some javascript in > application.js), > 1) for js format, can I safely assume that @name gets sent out in the > response as :json since the request was a xhr request? > No. json format has nothing in particular to do with ajax. > 2) When @name has been defined in the format.js block, can I assume that > the > data just gets sent in the response > No. Defining a variable and assigning it a value doesn't send anything to the browser. Instead, rails will attempt to render the page 'action_name.js.erb', and of course on that page any @ variables created in the action will be available. > and it is therefore up to any > javascript > to pick it up? > > Thank you -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Rails Hosting
On Fri, Sep 09, 2011 at 08:31:08AM -0500, Jazmin wrote: > This has probably been asked many many times but we are looking to host a > non-profit small Rails 3 app, the budget is about $20-25/month. the number > of concurrent expected users in the beginning is rather low. besides the > rails app there might be also need to host other php web sites such as > wordpress. > > I think at this point the research gave us 3 candidates. > -Linode > -Slice Host > -HostingRails > > Can anybody offer some input about this? We greatly appreciated. I just wanted to say that I've been with linode for a while now. Yes you have to manage things yourself but that can be a bonus in many situations. They've recently added a very cheap load balancing system too. In addition, their tech support is the best I have ever needed. I submitted a ticket a few days ago, had a reply within 4 minutes. The entire ticket was resolved within 15 minutes and I wasn't left waiting for a reply at any point. They really seem to know what they're talking about and take on board suggestions/feedback. pgpzc35gq0XtR.pgp Description: PGP signature
[Rails] Re: Rails Hosting
I'm a big fan of Heroku as well. Another option, although they aren't specifically rails-oriented, is dreamhost.com Pros - - Cheap -- Unlimited domains (excluding registration) bandwidth, storage, shell accounts, email addresses, mailing lists, etc all for under $10/month. (They also have occasional first-year-free offers.) - Free hosting for 501(c)3 charities. - Very spiffy web-based control panel - A broad range of preloaded software and 1-click installs offered. - Rails available via Apache/Passenger. (NOT a 1-click install) - VERY reliable. (I know, I shouldn't say that ... tempting the gods and all that.) They are a fairly "grown up" company - 300K customers on 4K servers. - Free two week trial. Cons - - Default configuration supports ruby 1.8.7 and rails 3.0.9 only. - No customer access to the system-wide error logs. i.e. silent failure on config/start-up errors. Once your process is up and running your logfiles will work. But if the error is early enough (e.g. syntax error in a config file) you have to contact tech support and ask them to look at the error output for you. So type carefully. - PostgreSQL not supported. (They say "maybe someday".) - Mediocre system documentation. - Bare-bones tech support in general and for ruby/rails in particular. And if you stray from their ruby/rails defaults you are completely on your own. So if you have a bunch of domains, not so much money, and are comfortable on the *nix command line, they are worth looking at. But if you want to keep things simple, go with Heroku. Dan Nachbar -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/gw1THtn9wMgJ. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Rails Hosting
> > This has probably been asked many many times but we are looking to host a > > non-profit small Rails 3 app, the budget is about $20-25/month. the number > > of concurrent expected users in the beginning is rather low. besides the > > rails app there might be also need to host other php web sites such as > > wordpress. > > > I think at this point the research gave us 3 candidates. > > -Linode > > -Slice Host > > -HostingRails > I can only say good things about Heroku for a low-cost/no-cost solution to Rails hosting. Great git integration, and has worked well for me over the past year. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Newbie | Installing mysql2 gem
then download the 64 bit version... On Sep 9, 5:23 am, Luis Lavena wrote: > On 8 sep, 11:32, Diego Waisman wrote: > > > > > > > > > > > Hello everyone, > > I wanted to learn about Ruby on Rails and its advantages and I decided > > to start with some tutorials. > > Unfortunately I'm forced to post my problem on the forum after days of > > unsuccessful solutions. > > I've installed Railsinstaller and mysql 5.5.15 64 bit version. > > I'm running win 7. I've been using the following command: > > > C:\>gem install mysql2 -- --with-mysql-lib=C:\MySQL\lib > > --with-mysql-include=C:\MySQL\include > > > I've used this command and included path for Mysql 32 bit (lib, include > > directories) but I constantly get the following error: > > > C:/RailsInstaller/Ruby1.9.2/bin/ruby.exe extconf.rb > > --with-mysql-lib=C:\MySQL\lib --with-mysql-include=C:\MySQL\include > > checking for rb_thread_blocking_region()... yes > > checking for main() in -llibmysql... no > > *** 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. > > > For what I understand it might be having problems finding the right > > library for the install. > > Any help is warmly appreciated. I've manage to create a working > > application with SQLite, but I honestly prefer to use Mysql. > > http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x6... > > You can't link 32bits Ruby against 64bits MySQL. > > -- > Luis Lavena -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] acst_as_solr error
On Fri, Sep 9, 2011 at 1:25 AM, Pab wrote: > i am using https://github.com/mattmatt/acts_as_solr > it shows the following error ... > so for me each is not working with ActsAsSolr::SearchResults > can any one provide me solution for this The solution has already been provided (more than once) for you: read the documentation for the library you're trying to use. -- Hassan Schroeder hassan.schroe...@gmail.com http://about.me/hassanschroeder twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: TCPServer in 1.9.2
On Sep 8, 6:02 pm, Dan wrote: > On Sep 8, 2:48 pm, zxcv wrote: > ... > > > > > require "socket" > > myserver = TCPserver.new('localhost', 0) > > It's TCPServer not TCPserver - note capital "S" > > Dan Nachbar Thanks Jazmin and Dan. That was the issue. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Rails Hosting
for Rails hosting, give heroku a try. if you want to host Rails and PHP, I recommend Linode. But you will need to administer the server yourself. On Fri, Sep 9, 2011 at 8:31 AM, Jazmin wrote: > This has probably been asked many many times but we are looking to host a > non-profit small Rails 3 app, the budget is about $20-25/month. the number > of concurrent expected users in the beginning is rather low. besides the > rails app there might be also need to host other php web sites such as > wordpress. > > I think at this point the research gave us 3 candidates. > -Linode > -Slice Host > -HostingRails > > Can anybody offer some input about this? We greatly appreciated. > > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Rails Hosting
This has probably been asked many many times but we are looking to host a non-profit small Rails 3 app, the budget is about $20-25/month. the number of concurrent expected users in the beginning is rather low. besides the rails app there might be also need to host other php web sites such as wordpress. I think at this point the research gave us 3 candidates. -Linode -Slice Host -HostingRails Can anybody offer some input about this? We greatly appreciated. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: hosting ror app in XAMPP
manikyalarao padala wrote in post #1020751: > can i host ROR app in xampp in windows os. http://whathaveyoutried.com/ -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Heroku, oauth, redirects and ajax
Hi, I have a controller method that makes at least 3 calls to external severs. The method is an oauth callback where intially I was (within that method) creating and saving a picture into rackspace, and then making two consecutive calls to an external service. After all that the end user sees a canvas that belongs to the external service application so my job is done. I have that in Heroku and I can't use background jobs so it all happens in a single request, when it enters the callback. As you can imagine the request can take a bit of time sometimes and Heroku only allows 30 seconds without giving something back to the client. So it breaks. What I did is to separate a bit the parts. Now my callback just stores the oauth credentials and then redirects to another method where I save the picture to the cloud and again redirect to yet another method that takes care of using the api with the other service. The result is that now Heroku is happy and all three requests complete. But I'm not happy since I don't think it is the way to implement it. The redirects go to an empty page that just reloads itself to the next phase. I would like to have a method that updates a loader or something in the browser without those ugly redirects. Any suggestions or examples around? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Maths with in Rails
Frederick Cheung wrote in post #1020782: > by default if you are working with integers you'll always get integers > back (by truncation). If you want floating point numbers then you > should convert the numbers you're working with to floating point > numbers first (using to_f), so > > 5 /2 will always return 2, but 5.0 / 2 will produce 2.5 This might also help to clarify what's happening: $ irb ruby-1.9.2-p290 :014 > x = 5 => 5 ruby-1.9.2-p290 :015 > y = 3 => 3 ruby-1.9.2-p290 :016 > z = x / y => 1 ruby-1.9.2-p290 :017 > x.class => Fixnum ruby-1.9.2-p290 :018 > y.class => Fixnum ruby-1.9.2-p290 :019 > z.class => Fixnum ruby-1.9.2-p290 :020 > x = 5 => 5 ruby-1.9.2-p290 :021 > y = 3.0 => 3.0 ruby-1.9.2-p290 :022 > z = x / y => 1.6667 ruby-1.9.2-p290 :023 > x.class => Fixnum ruby-1.9.2-p290 :024 > y.class => Float ruby-1.9.2-p290 :025 > z.class => Float ruby-1.9.2-p290 :026 > x = 5 => 5 ruby-1.9.2-p290 :027 > y = 3 => 3 ruby-1.9.2-p290 :028 > z = x.fdiv(y) => 1.6667 ruby-1.9.2-p290 :029 > x.class => Fixnum ruby-1.9.2-p290 :030 > y.class => Fixnum ruby-1.9.2-p290 :031 > z.class => Float ruby-1.9.2-p290 :032 > z = x.quo(y) => (5/3) ruby-1.9.2-p290 :033 > z.class => Rational ruby-1.9.2-p290 :034 > z.to_f => 1.6667 ruby-1.9.2-p290 :035 > z.to_i => 1 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] acst_as_solr error
Not a solution, but an end run around the problem: I used to use acts_as_solr, but now I use rsolr and it works without problem. It's a fairly similar API, but not identical, so it will take a little bit of change to your app. On Fri, Sep 9, 2011 at 4:25 AM, Pab wrote: > hi, > > i am using https://github.com/mattmatt/acts_as_solr > it shows the following error > "undefined method 'each' for " > for this > > results = Employee.find_by_solr(@id) > results.each do |emp| > puts emp.id > end > where plugin does not contains "each" method in acts_as_solr/libs/ > search_results.rb > so for me each is not working with ActsAsSolr::SearchResults > - > > next i tried with https://github.com/mauricio/acts_as_solr plugin > wich results in following error > > "undefined method 'find_by_solr' for " > > can any one provide me solution for this > > thanks > -pab > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: methods generated for an AR field: what do they do?
Frederick Cheung wrote in post #1017751: > The guts were moved into ActiveModel, but you can use it with active > record just like you used too. There was some fairly major refactoring > in rails 3 which confuses apidock quite a bit. Word. I eventually found the more modern docs for ActiveModel::Dirty -- it explains a bit more of what's going on: http://api.rubyonrails.org/classes/ActiveModel/Dirty.html Now it's clear that ActiveRecord includes ActiveModel::Dirty. Thanks, all. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: acts_as_solr problem ActsAsSolr::SearchResults:
hi, i got data using this three and i got another doubt in table i have changed id as emp_id, when i searched it it throws an error like Mysql::Error: Unknown column 'employees.id' in 'where clause': SELECT `employees`.* FROM `employees` WHERE (employees.id in (NULL)) how can i over come this thanks, -pab -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: acts_as_solr problem ActsAsSolr::SearchResults:
its searching for id where as i changed it as emp_id is there any solution for this? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Maths with in Rails
Without the code used in the display action it's difficult to know what's going on but I'd guess you're using an integer at some point and that causes loss of precision. On Sep 8, 4:37 am, Eugene de Winnaar wrote: > Hi All > > I have a idea that I am doing and it is working so far but when it > comes to displaying the data that I am getting > with the maths that I am doing I am not getting the same result. > > This is what I have > > @arrived = @worksheet.time_arrived_customer > @left = @worksheet.time_left_office > > @left_cust = @worksheet.time_left_customer > > @travel = ((@arrived - @left) * 2) > @worked = (@left_cust - @arrived) > > @total = (@travel + @worked) / 60 > > So what I did was in the DB I am saving the hours in their minute > form. > > 08:00 = 480 min > 08:15 = 495 min > > And so on. > > I am 100% sure the maths is working as I firstly did it on paper and > took those steps and put them into the action. > > When it comes to the display I am superpose to get 2.75 but I only see > 2 why is that > > I have looked at number_with_precision but rather then getting 2.75 I > get 2.00 > > Any Ideas would be appreciated. > > Regards -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: acts_as_solr problem ActsAsSolr::SearchResults:
Did you check the documentation I linked to? http://code.paperplanes.de/acts_as_solr/rdoc/classes/ActsAsSolr/SearchResults.html Specifically, have a look at the records() results() or docs() methods. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/6gNwPvP3gI8J. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Image upload with progress bar
I posted a tut at: http://boneheadcode.posterous.com/html5-paperclip-multiple-file-upload-and-atta that includes a %counter, so a progress bar wouldn't be too much of a stretch. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Image upload with progress bar
Manny 777 wrote in post #1020917: > Thank you Everaldo, > > well, probably I will try it, but in the best way, I would like to try > some way with jQuery... > This is a bit worse to find some good source Hi, this is what I use: http://aquantum-demo.appspot.com/file-upload It is relatively simple and does not require any flash for the progress bar like other plugins do. It offers two ways to do it, one with some defined UI (and more jquery dependencies) and then a basic one where you take care of the styling. It has a lot of options. I use the last one to reduce dependency. I don't use paperclip or carrierwave to handle the upload. In my case I just take the file and store it myself in the cloud. I know just the link doesn't help that much but it depends a lot on how you want to implement it. In my case I wanted to upload a pic, see the progress, be able to cancel and see it as a preview before a bigger form was sent. Then I wanted to be able to change the pic in the middle, etc. >From the ones I checked this was the best for my case. There's some examples in the wiki and the guy who runs it helped me quickly when I ran into a problem. Maybe you can take a look at it. Note that the progress information didn't really show moving before it was in the real server, locally didn't move. Cheers. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Captcha conception
On Sep 9, 10:54 am, Misha Ognev wrote: > Hi guys, the next problem: > > I create a controller, (/controllers/rmagick_controller.rb), which have > aim to test an captcha > > Actions: > def download # creates an captcha image > def show # show the page where image took place > def check # must check right captcha or wrong > > views/rmagick/show.html.erb: > > > > > <%= image_tag download_rmagick_path %> > > > <% form_tag check_rmagick_path do %> > > <%= text_field_tag :captcha %> > > <%= submit_tag "Submit" %> > > <% end %> > > > > > > config/routes.rb: > > > resources :rmagick do > > get "download", :on => :member > > get "check", :on => :member > > end Rails understand this as creating urls like rmagick/123/download, i.e. it things there are actual rmagick entities which supports a download action This means that when you call download_rmagick_path rails is expecting you to supply it with the id of the rmagick entity. If you don't rails won't be able to generate a url. You'd probably need to either switch to a singleton resource, make those actions collection actions, use match rather than creating a resource. The rails routing guide should explain the difference between these actions > > So, there are 2 problems: > > 1) Routes problem. If I'm write in config/routes.rb something like this: > > > get "rmagick/show" > > get "rmagick/download" > > get "rmagick/check" > > I catch this output:> No route matches {:action=>"download", > :controller=>"rmagick"} > > But I'm place get "rmagick/download" in routes.rb. Why it doesn't work? > (it can't find download_rmagick_path) > > So, if I use resources :rmagick do ... I see an show.html.erb when i > write something other than "show" text, ie in this link > 127.0.0.1:3000/rmagick/jjvniuv I also will see show action.why? How I > can change this? Where is the problem? That's what it's supposed to do - given the routes you've defined, / rmagick/jjvniuv is the path for the rmagick entity with the id jjvniuv > > 2) Problem with form_tag. So, you see the code above. When I put captcha > value and press "submit" button, I don't go to rmagick/check, I go to > rmagick/show/check. Why? > I'm surprised it does anything at all. You've got the same problem as earlier - a route that is expecting an id, but you're not giving it an id. You might also want to look at the recaptcha captcha - it's very easy to integrate Fred > 3) When I'll create all of this, how I can do interaction between other > pages and captcha? > > -- > Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: Image upload with progress bar
Hi! I hadn't noticed this tutorial was too old until sending the e-mail. I searched a little bit more and found this: http://blog.bitcrowd.net/uploadify-paperclip-rails-3-and-sessions/ They use flash (Uploadify) with JQuery, but mostly of the answers points this way. Best Regards, Everaldo On Fri, Sep 9, 2011 at 6:01 AM, Manny 777 wrote: > Thank you Everaldo, > > well, probably I will try it, but in the best way, I would like to try > some way with jQuery... > This is a bit worse to find some good source > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] rails 3.1 assets:precompile deployment
Hi all, I'm just deploying a few rails apps after upgrading to rails 3.1. I have implemented the asset pipeline and everything works ok. I'm deploying using Capistrano with the pre fabricated deploy/assets recipe. The problem I encounter is that the rake task takes like forever to precompile all my assets. I have to admit that there are a lot of assets that need to be precompiled +300 (images / js / css ) , becouse they include things like jquery ui, tiny mce, etc . I didn't think this might cause a problem, because when I run the assets:precompile rake task on my dev machine, all assets get precompiles within a few seconds, while doing this during deployment, it take almost more then 10minutes and the server load get really high! I haven't done any custom changes in the way I implemented the asset pipeline whatsoever. Hoping that someone can clarify if there are differences between precompiling in dev <-> prod, because I definitely need to optimize this. Thank you in advance -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Captcha conception
Hi guys, the next problem: I create a controller, (/controllers/rmagick_controller.rb), which have aim to test an captcha Actions: def download # creates an captcha image def show # show the page where image took place def check # must check right captcha or wrong views/rmagick/show.html.erb: > > <%= image_tag download_rmagick_path %> > > <% form_tag check_rmagick_path do %> > <%= text_field_tag :captcha %> > <%= submit_tag "Submit" %> ><% end %> > > config/routes.rb: > resources :rmagick do >get "download", :on => :member >get "check", :on => :member > end So, there are 2 problems: 1) Routes problem. If I'm write in config/routes.rb something like this: > get "rmagick/show" > get "rmagick/download" > get "rmagick/check" I catch this output: > No route matches {:action=>"download", :controller=>"rmagick"} But I'm place get "rmagick/download" in routes.rb. Why it doesn't work? (it can't find download_rmagick_path) So, if I use resources :rmagick do ... I see an show.html.erb when i write something other than "show" text, ie in this link 127.0.0.1:3000/rmagick/jjvniuv I also will see show action.why? How I can change this? Where is the problem? 2) Problem with form_tag. So, you see the code above. When I put captcha value and press "submit" button, I don't go to rmagick/check, I go to rmagick/show/check. Why? 3) When I'll create all of this, how I can do interaction between other pages and captcha? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Asset link in production is incorrect
Thanks guys, I think it is because I use this bit of line: Bundler.require *Rails.groups(:assets => %w(development test)) I changed it to: Bundler.require(:default, :assets, Rails.env) and it works. On Sep 9, 4:31 pm, Irish wrote: > I was having this same issue when upgrading a 2.3.12 app to 3.1 and > adding Greg's suggestion > > config.assets.digest = true > > to production.rb fixed it for me. > > Thanks! > > On Sep 8, 9:00 am, Greg Reinacker wrote: > > > > > > > > > Do you have > > > config.assets.enabled = true > > > in your application.rb or elsewhere, and > > > config.assets.digest = true > > > In your production.rb? > > > -GR > > > On Sep 8, 2011, at 9:56 AM, Joshua Partogi wrote: > > > > Hi there, > > > > So I am using Rails 3.1.0 in production. However the asset link that is > > > produced is: > > > > > href="/stylesheets/application.css"> > > > > Instead of: > > > > > href="/assets/application-md5hash.css"> > > > > I am using this config line in application.rb, which means my css is > > > precompiled > > > Bundler.require *Rails.groups(:assets => %w(development test)) > > > > What am I missing here? > > > > Thank you for your help. > > > > -- > > > @jpartogi > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Ruby on Rails: Talk" group. > > > To post to this group, send email to rubyonrails-talk@googlegroups.com. > > > To unsubscribe from this group, send email to > > > rubyonrails-talk+unsubscr...@googlegroups.com. > > > For more options, visit this group > > > athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Mysql::Error error in acts as solr plugin
hi, i am using acts_as_solr in plugin, in my table i got three columns emp_id, name, experience. when i tried to run my application i got following error "Mysql::Error: Unknown column 'employees.id' in 'where clause': SELECT `employees`.* FROM `employees` WHERE (employees.id in (NULL))" in my table i dont have column "id", but acts_as_solr search in terms of ID, is that any way to over come this error by overriding id to emp_id to make acts_as_solr to search in terms of emp_id like "employees.emp_id" thanks, -pab -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Image upload with progress bar
Thank you Everaldo, well, probably I will try it, but in the best way, I would like to try some way with jQuery... This is a bit worse to find some good source -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Changing the controller and action before that will be loaded.
On 9 September 2011 09:40, coolesting wrote: > Because this controller or action name is automatic, it will be stored > into database instead of that route file. (please leave some context from the message you're replying to to save us the hassle of trawling through our deleted items :-/ If your user requests '/books/ruby' with standard routing it would pass the :id of 'ruby' to the index action of the books controller (if you want your controller to be '/book/' you'll need to map a custom route to that). So in the index action, if you perform some custom operation (like a case switch on params[:id] or a find_by_other_field) to determine which other method to call, you should be able to take it from there. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Changing the controller and action before that will be loaded.
Because this controller or action name is automatic, it will be stored into database instead of that route file. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Changing the controller and action before that will be loaded.
Because this situation is automatic, i don't know it needs to change the controller book to which the anther controller or action. So, i can't bundle it into route in that file, in other words, the controller or action name will be stored to database. On Sep 9, 12:45 am, Colin Law wrote: > On 9 September 2011 08:29, coolesting wrote: > > > Hi, guys. > > > My problem is when i touch the route like '/book/ruby' that will loads the > > ApplicationController first, > > and then loads the action ruby of the controller book, the loading order as > > the following, > > > # First loading > > class ApplicationController < ActionController::Base > > protect_from_forgery > > # > > # Here, can i change the controller book and the action ruby for loading > > later ? > > Why not just change the route to invoke the action that you want? > > Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] acst_as_solr error
hi, i am using https://github.com/mattmatt/acts_as_solr it shows the following error "undefined method 'each' for " for this results = Employee.find_by_solr(@id) results.each do |emp| puts emp.id end where plugin does not contains "each" method in acts_as_solr/libs/ search_results.rb so for me each is not working with ActsAsSolr::SearchResults - next i tried with https://github.com/mauricio/acts_as_solr plugin wich results in following error "undefined method 'find_by_solr' for " can any one provide me solution for this thanks -pab -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Changing the controller and action before that will be loaded.
On 9 September 2011 08:29, coolesting wrote: > Hi, guys. > > My problem is when i touch the route like '/book/ruby' that will loads the > ApplicationController first, > and then loads the action ruby of the controller book, the loading order as > the following, > > # First loading > class ApplicationController < ActionController::Base > protect_from_forgery > # > # Here, can i change the controller book and the action ruby for loading > later ? Why not just change the route to invoke the action that you want? Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] How to use custom gem and call custom gem method into Rails 2.3 Application
Hi all, I have made one custom gem and I want to use that gem in my Rails 2.3 Application. It is installed,works fine and it is showing me into gem list. In this Gem's lib folder there is one mygem.rb file and I want to call the method of this mygem.rb file. So, how can I achieve this?? Please can any one help me out of this?? Thanks in advance. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Changing the controller and action before that will be loaded.
Hi, guys, my problem is when i touch the route like '/myc/mya' that will loads the application_controller first, and then loads the my_action of the my_controller, the loading order as the following, class ApplicationController < ActionController::Base protect_from_forgery end class MyController < ActionController::Base end -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Magic Multi Connections gem + Rails 3.1
As a old-school programmer I forgot, as usual, that nowadays visual debuggers are around ;) And RubyMine's debugger was pretty good at solving this task. Indeed, after few minutes I've found how to patch things to get workable state. Yesterday I've spend 1.5 hour wandering through sources without a clue, today problem was solved in 10 minutes. If you still think that RubyMine is too expensive, thinkg again ;) My temporary solution is at https://github.com/Nopik/magic_multi_connections though I consider it as dirty hack, not production code. Rails 3.0 compatibility is broken now, most likely, too. Will love to switch to official patch sooner or later. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Changing the controller and action before that will be loaded.
Hi, guys. My problem is when i touch the route like '/book/ruby' that will loads the ApplicationController first, and then loads the action ruby of the controller book, the loading order as the following, # First loading class ApplicationController < ActionController::Base protect_from_forgery # # Here, can i change the controller book and the action ruby for loading later ? # For example , we change the controller book to video, or change the action ruby to php # If the controller be changed to video as i say above, so, the controller video will be loaded instead of the # the book. # end # loading later.. # A custom controller and sereral actions. class BookController < ActionController::Base def ruby #do something. end def php #do something. end def python #do something. end end Thanks in advance. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] i need help.please anyone can help me out witth this.
On 9 September 2011 07:10, pratik m. wrote: > I installed ruby on my pc...then after that i got lib not found as one > error when i was installing rails... further all steps worked like > installing sqlite3 and creating test application...but wen i gave a cmd > called rake db:migrate, i got errors like these- rake aborted! > No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, > Rakefile.rb) > D:/Ruby192/lib/ruby/1.9.1/rake.rb:2367:in `raw_load_rakefile' > D:/Ruby192/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile' > D:/Ruby192/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling' > D:/Ruby192/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile' > D:/Ruby192/lib/ruby/1.9.1/rake.rb:1991:in `run' > D:/Ruby192/bin/rake:31:in `' > > > can u tell me wats wrongif that lib not found is also an error then > let me know abt that too Were you in the top level directory of a rails app when you ran rake? You should be in the directory that contains app, config, etc. -- Colin https://plus.google.com/111605230843729345543/ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.