hi yong i got the same proble and solved it , you can use in form tag uploadfile instead of uploadFile and in render file : use #"{root_url}/app/view/--path" hope you will solve it .. thanks rahul On Mar 28, 10:32 pm, Yong Gu <zerogy...@gmail.com> wrote: > Did you add uploadFile to route.rb? > > And i think you'd better follow rails' convention, instead of writing code > as like using some other frameworks > > On Mon, Mar 29, 2010 at 2:26 PM, Tony Augustine <li...@ruby-forum.com>wrote: > > > > > Yong Gu wrote: > > > I think use *render :file => 'uploadfile.html.erb'*, as rails would look > > > for > > > the template in your view directory, which is "app/views", > > > > and if you use render :file => 'controller/uploadfile.html.erb', it will > > > look for the template in "app/views/controller/uploadfile.html.erb", or > > > rails always > > > > assume you have already put your template in the controller's according > > > view > > > folder > > > wheen i did that i am getting the error like this > > > hiiiiiiiiiii3 > > SQL (0.5ms) SET client_min_messages TO 'panic' > > SQL (0.5ms) SET client_min_messages TO 'notice' > > SQL (0.6ms) SET client_encoding TO 'unicode' > > > Processing UploadController#uploadFile (for 127.0.0.1 at 2010-03-29 > > 11:47:28) [POST] > > Parameters: {"commit"=>"Upload", > > "authenticity_token"=>"g1vUQZ7QAh7FjfusjbJuh7EBO4UVVFInaYsxzCMK91I=", > > "date_file"=>{"upload"=>#<File:/tmp/RackMultipart.3648.0>}} > > > NoMethodError (You have a nil object when you didn't expect it! > > You might have expected an instance of ActiveRecord::Base. > > The error occurred while evaluating nil.[]): > > -- > > 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+unsubscribe@googlegroups.com<rubyonrails-talk%2Bunsubscribe@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en.- Hide quoted text - > > - Show quoted text - -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
yes, of course
try <%= button_to_remote "Test", :complete => "toggle_all();" %>
which toggle_all is your own defined javascript funciton or use $('.clazz').each(function(e) { e.toggle()} ) directly instead of toggle_all()
in fact, the value of parameter :complete is a javascript function , and visual_effect generate a function by using prototype.js. So you could
use any javascript function as you wish.
On Mon, Mar 29, 2010 at 2:40 PM, Dudebot <craignied@gmail.com> wrote: On Mar 28, 11:24 pm, Yong Gu < zerogy...@gmail.com> wrote: > i never tried that, but i think you could iterate the elements with the > class name like: ... Thanks--I was hoping that I could chain the events within/around the visual_effect method--any idea if that's possible in this framework?
-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Did you add uploadFile to route.rb?
And i think you'd better follow rails' convention, instead of writing code as like using some other frameworks On Mon, Mar 29, 2010 at 2:26 PM, Tony Augustine <lists@ruby-forum.com> wrote: Yong Gu wrote: > I think use *render :file => 'uploadfile.html.erb'*, as rails would look > for > the template in your view directory, which is "app/views", > > and if you use render :file => 'controller/uploadfile.html.erb', it will > look for the template in "app/views/controller/uploadfile.html.erb", or > rails always > > assume you have already put your template in the controller's according > view > folder wheen i did that i am getting the error like this hiiiiiiiiiii3 SQL (0.5ms) SET client_min_messages TO 'panic' SQL (0.5ms) SET client_min_messages TO 'notice' SQL (0.6ms) SET client_encoding TO 'unicode' Processing UploadController#uploadFile (for 127.0.0.1 at 2010-03-29 11:47:28) [POST] Parameters: {"commit"=>"Upload", "authenticity_token"=>"g1vUQZ7QAh7FjfusjbJuh7EBO4UVVFInaYsxzCMK91I=", "date_file"=>{"upload"=>#<File:/tmp/RackMultipart.3648.0>}} NoMethodError (You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[]): --
-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Yong Gu wrote: > I think use *render :file => 'uploadfile.html.erb'*, as rails would look > for > the template in your view directory, which is "app/views", > > and if you use render :file => 'controller/uploadfile.html.erb', it will > look for the template in "app/views/controller/uploadfile.html.erb", or > rails always > > assume you have already put your template in the controller's according > view > folder wheen i did that i am getting the error like this hiiiiiiiiiii3 SQL (0.5ms) SET client_min_messages TO 'panic' SQL (0.5ms) SET client_min_messages TO 'notice' SQL (0.6ms) SET client_encoding TO 'unicode' Processing UploadController#uploadFile (for 127.0.0.1 at 2010-03-29 11:47:28) [POST] Parameters: {"commit"=>"Upload", "authenticity_token"=>"g1vUQZ7QAh7FjfusjbJuh7EBO4UVVFInaYsxzCMK91I=", "date_file"=>{"upload"=>#<File:/tmp/RackMultipart.3648.0>}}
NoMethodError (You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[]): -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
i never tried that, but i think you could iterate the elements with the class name like:
$$('.clazz').each(function(e) { e.toggle(); })
or else, you could write your own function, for example: function toggle_all() { toggle1(); toggle2(); .. }
function toggle1() { ... }
function toggle2() { ... }
On Mon, Mar 29, 2010 at 2:15 PM, Dudebot <craignied@gmail.com> wrote: On Mar 28, 11:10 pm, Yong Gu < zerogy...@gmail.com> wrote: > try <div id="toggle_appear" style="display:none;"> yada yada yada </div> Thanks, Yong! One other question: is it possible to have multiple divs toggling on/ off at the same time? I tried changing "id" to "class", and then it simply wouldn't toggle. Many TIA again, -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
I think use render :file => 'uploadfile.html.erb', as rails would look for the template in your view directory, which is "app/views",
and if you use render :file => 'controller/uploadfile.html.erb', it will look for the template in "app/views/controller/uploadfile.html.erb", or rails always
assume you have already put your template in the controller's according view folder On Mon, Mar 29, 2010 at 12:41 PM, Tony Augustine <lists@ruby-forum.com> wrote: when i tried to crate an upload file application in rails i am getting error like this Template is missing Missing template app\views\upload\uploadfile.html.erb in view path app/views this is ma model class DataFile < ActiveRecord::Base def self.save(upload) name = upload['datafile'].original_filename directory = "public/data" # create the file path path = File.join(directory, name) # write the file File.open(path, "wb") { |f| f.write(upload['datafile'].read) } end end this is ma view file <h1>File Upload</h1> <%= start_form_tag ({:action => 'uploadFile'}, :multipart => true) %> <p><label for="upload_file">Select File</label> : <%= file_field 'upload', 'datafile' %></p> <%= submit_tag "Upload" %> <%= end_form_tag %> This is ma controller class UploadController < ApplicationController def index puts 'hiiiiiiiiiii' render :file => 'app\views\upload\uploadfile.html.erb' puts 'hiiiiiiiiiii2' end def uploadFile puts 'hiiiiiiiiiii3' post = DataFile.save(params[:upload]) render :text => "File has been uploaded successfully" end end -- 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+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
try <div id="toggle_appear" style="display:none;"> yada yada yada </div> On Mon, Mar 29, 2010 at 2:05 PM, Dudebot <craignied@gmail.com> wrote: This definitely works: <%= button_to_remote "Test", :complete => visual_effect( :toggle_appear, "toggle_appear" ) %> <div id="toggle_appear"> yada yada yada </div> To toggle content off -> content on, etc. But is there any way to have the initial content hidden? Many TIA, Craig -- 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+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
On Fri, Mar 26, 2010 at 3:19 AM, Tom Mac <lists@ruby-forum.com> wrote: Hi I am using seed_fu to seed initial data to tables (http://github.com/mbleigh/seed-fu) . And in db/fixtures/state.rb I have values like (I am filling only two data for simplicity) State.seed_many(:name, :abbr,:fips,:country_id, [ { :name => "Alberta", :abbr => 'AB',:fips => '01', :country_id => 2 }, { :name => "Alaska", :abbr => 'AK',:fips => '02', :country_id => 1 } ]) It works and when I do select * from states; I get result as +-----+------+-----------------------+------+------------+ | id | abbr | name | fips | country_id | +-----+------+-----------------------+------+------------+ | 1 | AB | Alberta | 01 | 2 | | 2 | AK | Alaska | 02 | 1 | But now I modified state.rb as State.seed_many(:name, :abbr,:fips,:country_id, [ { :name => "Alberta", :abbr => 'AB',:fips => '01', :country_id => 2 }, { :name => "Alaska", :abbr => 'AK',:fips => '02', :country_id => 1 } ]) State.destroy_all State.create(:id => 1,:name => "Alabama", :abbr => 'AL',:fips => '01', :country_id => 1)
Tom, you shouldn't be setting the value of the :id field because the database will ignore your setting and assign the next unique identifier automatically. Could you explain what you're trying to do in a step by step scenario? This may helper others on the mailing list to better assist you.
-Conrad And now when I do select * from states; I get unexpected result as +-----+------+-----------------------+------+------------+ | id | abbr | name | fips | country_id | +-----+------+-----------------------+------+------------+ | 5 | AL | Alabama | 01 | 1 | What I expect was id=1 But I got id as 5 . Why this ? Thanks in advance Tom -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Hi friends Im using act as solr for my project i would like to display query time for my results, im getting the query time from solr whether the Qtime is microsecond or millisecond can any one help me 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
You can use system call to execute jar file. # Change to the directory where jar resides Dir.chdir("#{RAILS_ROOT}/public/<dirname>/") do # Execute jar retResult = system("<path to java> -jar <jarname> <args 1> <args 2> .. <args n> ") if retResult Jar executes succesfully else error in executing jar file. end #chdir Thanks Senling On Mar 29, 12:10 am, Gautam <gdham...@gmail.com> wrote: > I have a rails app and a jar file. > I want my jar file to execute when the user presses a button on the > webpage. > Please tell me how to do that. > > Any help will be highly appreciated. > Thanks in anticipation. :) -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
when i tried to crate an upload file application in rails i am getting error like this Template is missing
Missing template app\views\upload\uploadfile.html.erb in view path app/views this is ma model class DataFile < ActiveRecord::Base def self.save(upload) name = upload['datafile'].original_filename directory = "public/data" # create the file path path = File.join(directory, name) # write the file File.open(path, "wb") { |f| f.write(upload['datafile'].read) } end end
this is ma view file
<h1>File Upload</h1> <%= start_form_tag ({:action => 'uploadFile'}, :multipart => true) %> <p><label for="upload_file">Select File</label> : <%= file_field 'upload', 'datafile' %></p> <%= submit_tag "Upload" %> <%= end_form_tag %>
This is ma controller
class UploadController < ApplicationController def index puts 'hiiiiiiiiiii' render :file => 'app\views\upload\uploadfile.html.erb' puts 'hiiiiiiiiiii2' end def uploadFile puts 'hiiiiiiiiiii3' post = DataFile.save(params[:upload]) render :text => "File has been uploaded successfully" end end -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
I'm fairly inclined to vote no on this issue. In particular I'm more of a fan of less ( http://lesscss.org) than Sass mostly because less renders plain old CSS so you can make the transition more gradually for existing sites. Cheers, Charlie On Sun, Mar 28, 2010 at 11:53 PM, [Square Talent] Dirk Kelly <dirk.kelly@squaretalent.com> wrote: Does anybody else have any desire to have compass (http://compass-style.org) included in the core? I find myself using this all the time for its mixins, however it could just be more bloat.
I've done a proof of concept and it's a fairly simple task to get it working, much like haml I just included a compass directory under plugins, and defined the config in a file within the same directory. Processes won't have to be changed, it just gives us all access to additional (and useful) mixins.
Fairly sure I could just make it an extension otherwise.
Cheers, DK -- Radiant CMS Dev Mailing List Post: radiantcms-dev@googlegroups.com Unsubscribe: radiantcms-dev-unsubscribe@googlegroups.com Group Site: http://groups.google.com/group/radiantcms-dev/ To unsubscribe from this group, send email to radiantcms-dev+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject. -- Radiant CMS Dev Mailing List Post: radiantcms-dev@googlegroups.com Unsubscribe: radiantcms-dev-unsubscribe@googlegroups.com Group Site: http://groups.google.com/group/radiantcms-dev/ To unsubscribe from this group, send email to radiantcms-dev+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
Read More…
Does anybody else have any desire to have compass (http://compass-style.org) included in the core?
I find myself using this all the time for its mixins, however it could just be more bloat.
I've done a proof of concept and it's a fairly simple task to get it working, much like haml I just included a compass directory under plugins, and defined the config in a file within the same directory. Processes won't have to be changed, it just gives us all access to additional (and useful) mixins.
Fairly sure I could just make it an extension otherwise.
Cheers, DK -- Radiant CMS Dev Mailing List Post: radiantcms-dev@googlegroups.com Unsubscribe: radiantcms-dev-unsubscribe@googlegroups.com Group Site: http://groups.google.com/group/radiantcms-dev/ To unsubscribe from this group, send email to radiantcms-dev+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
Read More…
I'm encountering an error within Textmate when executing the Run command, Command-R, from within a .feature file. The error message is "env: sh: No such file or directory". I've installed the Cucumber bundle from github and updated all gems. My path correctly points to ruby interpreter location. Any ideas? Thank you 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
I guess a more appropriate question is how do you deploy your spree app on a shared server after freezing it? On Mon, Mar 29, 2010 at 4:29 AM, Tsegaselassie Tadesse <tsegaselassi@gmail.com> wrote: Does anyone have an idea on how to solve this?On Sun, Mar 28, 2010 at 3:05 PM, Tsegaselassie Tadesse <tsegaselassi@gmail.com> wrote: Hi all,
I have a problem of seeing my CSS and Image files after deploying my spree app, what can be the problem? The text appears, just fine but the browser cannot find the css and image files. Here is what I have done, - I froze my app on local machine as instructed here (http://spreecommerce.com/documentation/server_configuration.html#special-production-deployment) - I uploaded app in a folder (not in public_html) - In my .htaccess file (in public_html) I put (as instructed by the hosting service provider)
PassengerEnabled on PassengerAppRoot /path/to/the/my/app/folder - Then I went on and started my server
After that I pointed my browser to my site and all I get is just text, no images, no css, I can't even login into the admin side. What might be the problem and how do I fix it? Thanks for reading this, Tsega
-- You received this message because you are subscribed to the Google Groups "Spree" group. To post to this group, send email to spree-user@googlegroups.com. To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
Read More…
Does anyone have an idea on how to solve this? On Sun, Mar 28, 2010 at 3:05 PM, Tsegaselassie Tadesse <tsegaselassi@gmail.com> wrote: Hi all,
I have a problem of seeing my CSS and Image files after deploying my spree app, what can be the problem? The text appears, just fine but the browser cannot find the css and image files. Here is what I have done, - I froze my app on local machine as instructed here (http://spreecommerce.com/documentation/server_configuration.html#special-production-deployment) - I uploaded app in a folder (not in public_html) - In my .htaccess file (in public_html) I put (as instructed by the hosting service provider)
PassengerEnabled on PassengerAppRoot /path/to/the/my/app/folder - Then I went on and started my server
After that I pointed my browser to my site and all I get is just text, no images, no css, I can't even login into the admin side. What might be the problem and how do I fix it? Thanks for reading this, Tsega
-- You received this message because you are subscribed to the Google Groups "Spree" group. To post to this group, send email to spree-user@googlegroups.com. To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
Read More…
class Address < ActiveRecord::Base belongs_to :addressable, :polymorphic => true end class Client < ActiveRecord::Base has_one :address, :as => :addressable end Now I'am able to create a correct entry in the db for address with addressable_id = 1#client_id addreassable_type = 'Client' but when I retrieve client = Client.find(1) --> return client instance with id =1 address = client.address -> address is not nil BUT address.attributes == nil Somehow I can't retrieve the address back using association client.address even though I could create it. I must be missing something simple. Would appreciate any tips. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Hi, I have a Spree 0.10.1 and an extension. I want to drop some items in the navigation bar (search bar and cart) when I 'hit' routes from this extension. I don't know if this is possible with the actual theming feature? Regards,
Bruno Le Hyaric. -- You received this message because you are subscribed to the Google Groups "Spree" group. To post to this group, send email to spree-user@googlegroups.com. To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
Read More…
On Mar 28, 7:23 pm, Derek Cannon < li...@ruby-forum.com> wrote: > > But now that I'm getting started with Rails, I'd like to create a > controller that -- instead of displaying the movie information to the > console -- would write these variables into a SQLite3 database. I've > looked around, and I've already got the database set up, and with > Scaffolding, I can add/edit/remove entries manually, but I'm still > unsure of how to: > > 1. Copy/paste my Ruby code into my Rails project. (Does the class I've > created simply go into a new controller, or is there some other > convention for where to put complete Ruby classes?) > 2. How to add the variables directly to the database, so I don't have to > manually enter the data. What you would typically do is create a subclass of ActiveRecord::Base called Movie. Whenever you create and save and object of that class a row appears in the movies table. Instead of creating instances of your current Movie class, create instances of your new ActiveRecord derived one. Your xml parsing code can probably stay pretty much the same, except that you'll either want to do Movie.create(hash_of_attributes) or do Movie.new and then set the attributes one by one. Fred -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
+1 I couldn't figure out how to use this either. A simple fix would be to just add an "apply" button like you said. On Mar 26, 11:13 am, McKenzie <r...@souliss.com> wrote: > Hi guys, > > At the chance of sounding extremely stupid I've been looking round on > the checkout process and trying to figure out how to apply the > discount code that I've setup on my spree website. I can't seem to > find a button anywhere? (Using Spree 0.10.1) > > I think it is very confusing, would it not be better to have the > coupon code input box on the shopping cart screen and have an "apply > code" button or something along those lines? > > Thanks > > Ryan -- You received this message because you are subscribed to the Google Groups "Spree" group. To post to this group, send email to spree-user@googlegroups.com. To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
Read More…
1. You have to create controllers with the class names and then you can copy the code in the controllers. 2. You can create a model and a database with all the fields you want and then you can insert the data in the db from the variables using a controller. I am also a beginner at Rails. So, please confirm this with someone else as well. Happy coding! On Mar 28, 11:23 pm, Derek Cannon <li...@ruby-forum.com> wrote: > (First, I'm very new to Rails and still slightly new to Ruby. So bare > with me.) > > I made a Ruby application that allows me to view local XML files which > contain information on my favorite movies. My program reads the XML > files and loads them into variables (such as @title = "The Terminator, > @year = "1984", etc). All of this is done in a class called Movie, so I > get all the XML files from a directory, then create an array of Movie > classes which all hold the information for their specific XML file. > > (For the visual thinkers, that's: my_dir.each { |i| > my_array.push(Movie.new(i)) }) > > Everything works fine, and I can organize the data however I please. > > But now that I'm getting started with Rails, I'd like to create a > controller that -- instead of displaying the movie information to the > console -- would write these variables into a SQLite3 database. I've > looked around, and I've already got the database set up, and with > Scaffolding, I can add/edit/remove entries manually, but I'm still > unsure of how to: > > 1. Copy/paste my Ruby code into my Rails project. (Does the class I've > created simply go into a new controller, or is there some other > convention for where to put complete Ruby classes?) > 2. How to add the variables directly to the database, so I don't have to > manually enter the data. > > If anyone could help me with this, I'd greatly appreciate it. If you're > curious as to my level of knowledge in Rails, the only things I have a > fairly good grasp on are: how to start a server, how to view the pages > on the server, how to create a database (with all the tables I need), > how to create a scaffolding, and what the difference is between > controllers and the actual view page. > -- > 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
I'm occasionally getting exception notices with this error message: ActionController::UnknownHttpMethod: ***, accepted HTTP methods are get, head, put, post, delete, and options Anyone ever seen this or know what could be causing it? Thanks, Jeff -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Frederick Cheung wrote: > On 28 Mar, 16:17, Graham Farrell < li...@ruby-forum.com> wrote: >> `publiic_indices` >> >> I know that none of my tables have an index setup could this be the >> problem?? >> > It's looking for a table called publiic_indices, which sounds like a > typo to me - public_indices would be a more normal spelling. If your > database does contain a public_indices table then see if there are any > references to that table name or a publiic_indices.yml fixture file > and try correcting the spelling. > > Fred Hi Fred, I noticed that it was looking for the table but I knew that I didn't have a table of this name in my project. I found the offending yml file in the fixtures, it was from a MVC that one of the other guys had created then deleted but for some reason the this file wasn't deleted also. Thanks for your help, Graham -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Yes, you are correct. Terrible naming. But was done to try quick example. I am creating new player so @cpr it won't find player because I am in fact creating one. I know... terrible code. It seems to be looking for Active Record object and I am passing in array... Help! On Mar 28, 6:08 am, Art Shayderovtry <ashayde...@gmail.com> wrote: > It's rather unusual to name the action 'index' when it shows form for > creating a new object. Why not call it 'new' or something like that. > And then the action is named 'update_player' when in fact it is > creating a new Player object. Why don't you name it 'create'? > I'm sorry for nitpicking but choosing the right names will make your > life easier. (and will raise your chances for getting the answer) > > Regarding your question. I usually look at params in such a situation. > You can find request params in webserver log(just scroll console > window where webrick is started) or you can insert a call to > 'debugger' in the action and start webserver in debug mode (with '-- > debugger').
-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
(First, I'm very new to Rails and still slightly new to Ruby. So bare with me.) I made a Ruby application that allows me to view local XML files which contain information on my favorite movies. My program reads the XML files and loads them into variables (such as @title = "The Terminator, @year = "1984", etc). All of this is done in a class called Movie, so I get all the XML files from a directory, then create an array of Movie classes which all hold the information for their specific XML file. (For the visual thinkers, that's: my_dir.each { |i| my_array.push(Movie.new(i)) }) Everything works fine, and I can organize the data however I please. But now that I'm getting started with Rails, I'd like to create a controller that -- instead of displaying the movie information to the console -- would write these variables into a SQLite3 database. I've looked around, and I've already got the database set up, and with Scaffolding, I can add/edit/remove entries manually, but I'm still unsure of how to: 1. Copy/paste my Ruby code into my Rails project. (Does the class I've created simply go into a new controller, or is there some other convention for where to put complete Ruby classes?) 2. How to add the variables directly to the database, so I don't have to manually enter the data. If anyone could help me with this, I'd greatly appreciate it. If you're curious as to my level of knowledge in Rails, the only things I have a fairly good grasp on are: how to start a server, how to view the pages on the server, how to create a database (with all the tables I need), how to create a scaffolding, and what the difference is between controllers and the actual view page. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Hi, I want to send a file "joke.txt" with ActionMailer but I want to rename the file in the mail "député.txt" I set the parameters :filename of the attachment to "député.txt" But when I receive the mail I can see : "d��put��.txt" In the log : filename*=iso-2022-jp'ja'd%c3%a9put%c3%a9.txt How can I fix it ? Thanks for your answer :) adrien -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
On 28 Mar, 16:17, Graham Farrell < li...@ruby-forum.com> wrote: > Hi all, > > I'm new to ROR so sorry if this is simple. > > I'm using NetBeans 6.8 as my IDE and I'm trying to run tests on my > shared project but I'm hitting the error beow and I can't figure out > what it means. > > ActiveRecord::StatementInvalid: Mysql::Error: Table > 'mydatabase_test.publiic_indices' doesn't exist: DELETE FROM > `publiic_indices` > > I know that none of my tables have an index setup could this be the > problem?? > It's looking for a table called publiic_indices, which sounds like a typo to me - public_indices would be a more normal spelling. If your database does contain a public_indices table then see if there are any references to that table name or a publiic_indices.yml fixture file and try correcting the spelling. Fred > Any help greatly appricated. > > Graham > -- > 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Why not use one of the versioning/auditing gems ( http://ruby-toolbox.com/categories/activerecord_versioning.html) instead? On Mar 28, 5:30 am, eugenio <eugenio.mode...@gmail.com> wrote: > hello everybody. > i need to log "who did what" on some models. i was reading recipe 59 > of rails recipes and i created something like that: > > class LogSweeper < ActionController::Caching::Sweeper > observe :model1, :model2, :model3, :model4, :model5, ... > > after_save(model) > save_log(model, "save") > end > > after_destroy(model) > save_log(model, "destroy) > end > > private > save_log(model, event, user_id = controller.session[:account_id]) > #create the log entry, i want to save the id of the model, the id > of the logged user and something to describe the action. > #controller isn't defined here so i can't access the user_id. > end > end > > in environment.rb i added: > config.active_record.observers = :log_sweeper > > the sweeper is called when something happen to the observed models, > but i can't access the controller (and so, the user_id) from there. > any help?
-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Hi all, I'm new to ROR so sorry if this is simple. I'm using NetBeans 6.8 as my IDE and I'm trying to run tests on my shared project but I'm hitting the error beow and I can't figure out what it means. ActiveRecord::StatementInvalid: Mysql::Error: Table 'mydatabase_test.publiic_indices' doesn't exist: DELETE FROM `publiic_indices`
I know that none of my tables have an index setup could this be the problem??
Any help greatly appricated.
Graham -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
ok so I got "downloable" extension converted to use the hooks and can now configure a product to have a download.. But when I try to order the item (I tried items without downloads and brand new items with only downloadable "stuff").. I also tried as a regular user and as the admin.. Every time after clicking the "checkout" button I get the error listed below.. I can't seem to find where the extension does anything to can_access.. I'm no RoR expert (25 years cobol/c/c++/ java has left me a bit perplexed by the mixins stuff :-) ).. Anyways.. any hints or nudges in the right direction would be greatly appreciated.. Thanks in advance! Gary undefined method `can_access?' for #<CheckoutsController:0xb5ab182c> Stack trace: /usr/lib/ruby/gems/1.8/gems/spree-0.10.1/lib/ role_requirement_system.rb:124:in `check_roles' /usr/lib/ruby/gems/1.8/gems/spree-0.10.1/lib/ role_requirement_system.rb:124:in `check_roles' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/ callbacks.rb:178:in `send' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/ callbacks.rb:178:in `evaluate_method' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/ callbacks.rb:166:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ filters.rb:225:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ filters.rb:629:in `run_before_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ filters.rb:615:in `call_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ filters.rb:610:in `perform_action_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ benchmarking.rb:68:in `perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/ core_ext/benchmark.rb:17:in `ms' /usr/lib/ruby/1.8/benchmark.rb:308:in `realtime' /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/ core_ext/benchmark.rb:17:in `ms' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ benchmarking.rb:68:in `perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ rescue.rb:160:in `perform_action_without_flash' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ flash.rb:146:in `perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ base.rb:532:in `send' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ base.rb:532:in `process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ filters.rb:606:in `process' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ base.rb:391:in `process' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ base.rb:386:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ routing/route_set.rb:437:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ dispatcher.rb:87:in `dispatch' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ dispatcher.rb:121:in `_call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ dispatcher.rb:130:in `build_middleware_stack' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/ query_cache.rb:29:in `call' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/ query_cache.rb:29:in `call' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/ connection_adapters/abstract/query_cache.rb:34:in `cache' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/ query_cache.rb:9:in `cache' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/ query_cache.rb:28:in `call' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/ connection_adapters/abstract/connection_pool.rb:361:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ string_coercion.rb:25:in `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/head.rb:9:in `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/methodoverride.rb: 24:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ params_parser.rb:15:in `call' /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/rack/metal.rb:47:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ session/cookie_store.rb:93:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ failsafe.rb:26:in `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `synchronize' /usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ dispatcher.rb:114:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ reloader.rb:34:in `run' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ dispatcher.rb:108:in `call' /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/rack/static.rb:31:in `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:46:in `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `each' /usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `call' /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/rack/log_tailer.rb: 17:in `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/content_length.rb: 13:in `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb: 50:in `service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/lib/ruby/1.8/webrick/server.rb:162:in `start' /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:in `start' /usr/lib/ruby/1.8/webrick/server.rb:92:in `each' /usr/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib/ruby/1.8/webrick/server.rb:23:in `start' /usr/lib/ruby/1.8/webrick/server.rb:82:in `start' /usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb: 14:in `run' /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:111 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' script/server:3 On Mar 25, 12:54 pm, Gary <gppink...@gmail.com> wrote: > So I'm about to start a new site with Spree.. I downloaded and > installed the latest release 0.10.1.. My #1 requirement is digital > downloads so the downloadable extension is a must.. I see it works > with Spree 0.9.*.. I was going to try to upgrade it to work with > 0.10.1.. Curious about a couple of things first.. > > 1. Has anyone already started doing this? > 2. Would you recommend sticking with 0.9 and just using the current > downloadable or is 0.10.1 really worth the effort? > 3. Has anyone recently done an upgrade of another extension from 0.9 > to 0.10? Pointers, tips, tricks etc would be greatly appreciated.. > > Thanks! > Gary -- You received this message because you are subscribed to the Google Groups "Spree" group. To post to this group, send email to spree-user@googlegroups.com. To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
Read More…
It's rather unusual to name the action 'index' when it shows form for creating a new object. Why not call it 'new' or something like that. And then the action is named 'update_player' when in fact it is creating a new Player object. Why don't you name it 'create'? I'm sorry for nitpicking but choosing the right names will make your life easier. (and will raise your chances for getting the answer) Regarding your question. I usually look at params in such a situation. You can find request params in webserver log(just scroll console window where webrick is started) or you can insert a call to 'debugger' in the action and start webserver in debug mode (with '-- debugger'). -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Why is the name of your variable starting with '$'? Names starting with '$' are reserved for environment variables. I'm not sure about '$x' but you better follow ruby and rails guidelines for naming variables or you may be asking for trouble. On Mar 28, 4:10 pm, Felix Schäfer <schae...@cypres-it.com> wrote: > Am 28.03.2010 um 10:38 schrieb kevid: > > > please i have an array in my rails application (for example; $x = [23, > > how, this,56, you, nice]) > > > I want to store it in a mysql database as a SINGLE RECORD with a > > name . > > > thus i can get each array with its name and still be able to access > > the array like an array > > > i.e $x[0] # => 23 > > $x[1] # => how > -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
On 28 March 2010 11:23, Castilho < rafael@castilho.biz> wrote: > If your Ubuntu is the 9.10, then > apt-get install rails That should be sudo apt-get install rails of course, but I thought there were some issues installing from the ubuntu repository though I don't remember what. Colin > otherwise > http://castilho.biz/blog/2009/11/05/ruby-on-rails-ubuntu-9-10-karmic-koala > > Best regards > > On Mar 27, 6:41 pm, sachiguns <sachig...@gmail.com> wrote: >> i am new to rails so please help me to install >> ruby on rails to my ubuntu 9.10 >> >> Thanks > > -- > 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+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
hello everybody. i need to log "who did what" on some models. i was reading recipe 59 of rails recipes and i created something like that: class LogSweeper < ActionController::Caching::Sweeper observe :model1, :model2, :model3, :model4, :model5, ... after_save(model) save_log(model, "save") end after_destroy(model) save_log(model, "destroy) end private save_log(model, event, user_id = controller.session[:account_id]) #create the log entry, i want to save the id of the model, the id of the logged user and something to describe the action. #controller isn't defined here so i can't access the user_id. end end in environment.rb i added: config.active_record.observers = :log_sweeper the sweeper is called when something happen to the observed models, but i can't access the controller (and so, the user_id) from there. any help?
-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Am 28.03.2010 um 10:38 schrieb kevid: > please i have an array in my rails application (for example; $x = [23, > how, this,56, you, nice]) > > I want to store it in a mysql database as a SINGLE RECORD with a > name . > > thus i can get each array with its name and still be able to access > the array like an array > > i.e $x[0] # => 23 > $x[1] # => how > > .....and so on > > I don't know what DATA TYPE to use and how to do it. See "Saving arrays, hashes, and other non-mappable objects in text columns" in http://api.rubyonrails.org/classes/ActiveRecord/Base.html
Felix -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Hi all, I have a problem of seeing my CSS and Image files after deploying my spree app, what can be the problem? The text appears, just fine but the browser cannot find the css and image files. Here is what I have done, - I froze my app on local machine as instructed here ( http://spreecommerce.com/documentation/server_configuration.html#special-production-deployment) - I uploaded app in a folder (not in public_html) - In my .htaccess file (in public_html) I put (as instructed by the hosting service provider) PassengerEnabled on PassengerAppRoot /path/to/the/my/app/folder - Then I went on and started my server After that I pointed my browser to my site and all I get is just text, no images, no css, I can't even login into the admin side. What might be the problem and how do I fix it? Thanks for reading this, Tsega -- You received this message because you are subscribed to the Google Groups "Spree" group. To post to this group, send email to spree-user@googlegroups.com. To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
Read More…
you can take varchar dear i hope it will work.. On Mar 28, 1:38 pm, kevid <alumsimport...@yahoo.ca> wrote: > Hi all, > > please i have an array in my rails application (for example; $x = [23, > how, this,56, you, nice]) > > I want to store it in a mysql database as a SINGLE RECORD with a > name . > > thus i can get each array with its name and still be able to access > the array like an array > > i.e $x[0] # => 23 > $x[1] # => how > > .....and so on > > I don't know what DATA TYPE to use and how to do it. > > any sugesstion is welcomed. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
+1 I agree. I think an "Apply coupon" button would fix this confusion. On Mar 26, 5:24 pm, Chris <r3ap3r2...@gmail.com> wrote: > +1 for me. > Hitting 'Enter' on a website to submit a form is counter-intuitive to > me. My natural pattern was to put the coupon code in the box and hit > the 'Save and Continue' button, which just threw out the code. > -Chris > > > > On Sat, Mar 27, 2010 at 12:13 AM, McKenzie <r...@souliss.com> wrote: > > Hi guys, > > > At the chance of sounding extremely stupid I've been looking round on > > the checkout process and trying to figure out how to apply the > > discount code that I've setup on my spree website. I can't seem to > > find a button anywhere? (Using Spree 0.10.1) > > > I think it is very confusing, would it not be better to have the > > coupon code input box on the shopping cart screen and have an "apply > > code" button or something along those lines? > > > Thanks > > > Ryan > > > -- > > You received this message because you are subscribed to the Google Groups "Spree" group. > > To post to this group, send email to spree-user@googlegroups.com. > > To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/spree-user?hl=en. -- You received this message because you are subscribed to the Google Groups "Spree" group. To post to this group, send email to spree-user@googlegroups.com. To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
Read More…
On Sun, Mar 28, 2010 at 1:41 AM, Robert Gleeson < rob@flowof.info> wrote: > I'd ask the same as Samuel. Is this just for people in the united > states? Ruby Summer of Code is open to all students worldwide, minus those in the handful of countries prohibited by U.S. law (e.g. Cuba, Iran, Syria, ...) Last year, Rails had only 1 U.S. citizen among our 4 students participating in Google Summer of Code. jeremy -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Hi all, please i have an array in my rails application (for example; $x = [23, how, this,56, you, nice]) I want to store it in a mysql database as a SINGLE RECORD with a name . thus i can get each array with its name and still be able to access the array like an array i.e $x[0] # => 23 $x[1] # => how .....and so on I don't know what DATA TYPE to use and how to do it. any sugesstion is welcomed. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
Hi all, Mail 2.1.5 has now been pushed to Gemcutter. Key features and bug fixes * Mail now tries to be smart about the body and auto encodes where it can, makes things work nicer - big thank you to Peter Bowen (github.com/pzb) for this work. * Mail::Message now provides a #errors method. This contains an array for each header field that failed to parse, the header field will then be parsed as an UnstructuredField. * Updated vendor'd treetop with latest changes from Nathan Sobo's branch and Jeremy Kemper's branch * Keep header field case when instantiating an Unstructured Field. * Adding Message#decoded returns Message#body#decoded if the message is not multipart * Content transfer encoding failed on trailing semi-colon, fixed You can get it from gemcutter or from github/mikel/mail tag 2.1.5 -- http://rubyx.com/ http://lindsaar.net/ -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…
|