I have no internet connection on server machine, so I need to install gems locally.
I tried
gem install rails-2.3.4.gem
But, I'm getting errors.
How Can I install gems locally.
Thanks.
I'm using the Ruby GData Library to access Google Docs and I recently got the GData::Client::CaptchaError because I was re-logging in with every request. Reading this post, it recommends not logging in with every request, but caching the authentication token. How do I go about doing that correctly? Google says it expires every 24 hours, and it doesn't seem like I should store it in the session, so what should I do? I'm using Ruby on Rails with all this.
Thanks so much
I am a newbie to Amazon SQS and ruby on rails. And i am working on a project that some XML messages must be send to SQS. How do i do that?
Now i have this in the controller after the .save
def create
@thing = Thing.new(params[:thing])
respond_to do |format|
if @thing.save
message = @thing.to_xml
and in the model
inputqueue.send_message(message)
Is this the way i can send an XML file to SQS or??
When ever I run make I get this 'uninitialized constant RDoc::RDoc' error
rake -T
(in Main)
rake aborted!
uninitialized constant RDoc::RDoc
C:/Ruby186/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile'
(See full trace by running task with --trace)
--edit
Running --trace it seems the only non rails code is from rdoc_rails. Since other people seem to be able to run it fine I assume I am missing a gem or plugin but I can't figure out which.
I have kind of a complicated case and am wondering how this would work in rails:
I want to categories the genres of some singers. Singers can belong to more than one genres, and users can assign tags to each genre
For example:
singers <-- singers_genres -- genres <-- genres_tags -- tags
SQL would look something like:
SELECT * FROM singers S
INNER JOIN singers_genres SG ON S.id=SG.singer_id
INNER JOIN genres G ON G.id = SG.genre_id
LEFT OUTER JOIN genre_tags GT ON G.id = GT.genre_id
INNER JOIN tags T ON GT.tag_id = T.id
I want to implement a model "Contact", whose data is not stored in database, but remotely.
The operations on data are done via web service.
The model Contact is related to other models, whose data is stored locally.
Is there any plugin/gem which can take care of this?
Regards,
Pankaj
Im trying to eliminate two tables from my database. The tables are message_sort_options and per_page_options. These tables basically just have 5 records which are options a user can set as their preference in a preferences table. The preferences table has columns like sort_preferences and per_page_preference which both point to a record in the other two tables containing the options. How can i set up the models with virtual attributes and fixed values for the options - eliminating table lookups every time the preferences are looked up?
I learned everything I know about Rails from Railscasts. Now I want to learn Django but I'm not finding any comprehensive tutorial resources like Railscasts. Does an equivalent not exist in the Django world? If so, is that because there is less to learn?
Hi,
I'm developing a Rails application with Rspec for unit testing.
Weeks ago, Rspec used to migrate the database to the last version automatically when executing 'rake spec', but now it doesn't do it automatically, I have to implement everything for myself.
This happens in test environment, because my development data doesn't desappear.
Is my fault? I didn't change anything, I think :)
Thanks in advance.
I want to build a social network, with some of the users being able to put up some stuff up for sale. So basically, a social network + multiple sellers e-commerce.
What is the best technology solution for that? I was thinking of going Rails route, using CommunityEngine and ActiveMerchant. Another option is going PHP and using something like X-Cart, which already has multiple sellers interface. Any recommendations?
Thanks!
I'm generating a PNG file in Flex from graphics drawn by user. I would like to send the file to Ruby on Rails backend and I'm using RubyAMF in other parts of the application.
I found ways to upload the file using FileReference which uses HTTP but I prefer to send using RubyAMF ,if possible, as it's more efficient.
If this is possible what is your suggested method?
Has anyone managed to make the example at http://railscasts.com/episodes/196-nested-model-form-part-1 work?
When I followed through the sample, it never saves any question nor the answer to the database but it manages to create a new survey entry.
I am using:
Rails 2.3.5
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
nifty-generators (0.4.0)
Hello everybody
I want to send emails with formatted sender such as "Support team [email protected]".
If delivery method I wrote from "support team <[email protected]>" and from "\"support team\" <[email protected]>" but smtp server says
#: "@" or "." expected after "test"
This means that rails puts full "from" string into braces. How can I fix this without monkeypatching?
For you rails programmers, what's the easiest way to keep your RDoc files up-to-date?
I know I can run rake doc:app manually, but I really don't feel like adding a manual step to the check-in process, and since we're already using cruisecontrolrb to handle deployment and testing automation, it seems like there should be an easy way to regenerate these files on check-in.
Is anyone already automating rake doc:app? And, if so, what are your suggestions?
Good Afternoon All,
I'm having trouble integrating this template into my rails application. I've changes all the images and loaded all the files into their relevant areas. However they still have the subdirectories.
Does anyone know of a guide I can walk through which might explain how you do this, especially to include the revolution-slider which has a whole subdirectory of CSS and images.
Template being used:
https://wrapbootstrap.com/theme/pixma-responsive-multipurpose-template-WB0B348C6
Thanks for the help.
Hi,
My rails application requires few values to be specified in the text box.
My web page contains few text boxes .How can i specify the values of these text boxes in the url as query string while using webrick?can any one help, am new to this.
Thanks in advance.
As the title sais: How can I use the Restful Authentication Plugin with Ruby on Rails. When I want to create a new user, it requires me a (wrong-named, confusing field) login (= username), email address and password. However, I want, like Facebook does, only require the user to enter an email address and password, not a username. People will also login with this email address.
Can anyone help me?
In Ruby on Rails I'm doing something like:
Appointment.find( :first, :conditions => "staff_id = #{staff_id} AND datetimefield = #{datetime}")
... where datetimefield is of course, a datetime field. But, I only want rows where the date is equal to a given day, say 2/12/2011. I don't care about the time. What's an easy way to do this?
Thanks!
I wrote up some instructions for freezing a non-native gem in a Rails app today:
install the gem
sudo gem install fastercsv
put the reference in the environment.rb (I think this is only necessary to do unpack with no GEM specified)
config.gem "fastercsv"
unpack the gem
rake gems:unpack GEM=fastercsv
uninstall the gem
sudo gem uninstall fastercsv
I know this must be the long way around: how can I unpack the gem without installing it first?
Also: What's the difference between rake gems:unpack GEM=fastercsv and gem unpack fastercsv?
I zipped a rails project from OS X and sent it to a colleague who works on Windows. He updated the source, zipped the whole project folder and sent the zip file back to me.
After unzipping the project, I found that the file permissions information is kind of lost. For example, the script/server is changed from -rwxr-xr-x to -rw-r--r--. Is there a way to preserver the file permission flags, when transferring files between mac and windows?
Thanks
In a ruby on rails app, I build an array of Project Names and project id values, but want to truncate the length of the names. Current code is:
names = active_projects.collect {|proj| [proj.name, proj.id]}
I have tried to add a truncate function to the block, but am getting undefined method for class error.
Thanks in advance - I just cannot wrap my head around this yet.
I'm attempting to interact with the Google contacts API through Rails via and oauth-plugin. I need to retrieve and update Google contacts. I know that the portablecontacts gem will retrieve contacts, but does not allow for adding or updating. I was wondering if anyone knew of a gem that will handle this type of interaction. If not what would be the best method to implement a gem that would make it easier to handle the responses.
How to display a string in correct format as i enter it in the textarea in ruby on rails?
actually i enter some string in the textarea as:
my name
is jamal.
now there is a next line starting after name... but i get the following in the view...
my name is jamal
which i don't want to be like that... so, how to get the correct format..?
i hope u understand...
Just asking whenever devise authentication mechanism for Rails does not conflict with declarative_authorization.
Maybe someone tried this combo and can share their knowledge, so I and other coders do not waste time trying to tie these ones up.
In Rails, I have a question on how to get the multiple params !
for example:
the string in log like this
Processing ConfigurationsController#emergency_config (for 192.168.1.124 at 2010-05-31 11:45:53) [POST]
Parameters: {"authenticity_token"=>"I3GPKyrjmDRLkMIxFVS/47mgEI4ETO/+YW+R8R5Q2GM=", "tid"=>"1", "emergency"=>{"department"=>["1", "2", "3", "4", "5", "6", "7", "8"]}}
so,how can i get the department values from it? who can tell me the answer? thank you!