I used RVM to install Ruby 1.9.3 on Ubuntu 12.04 by doing rvm pkg install openssl rvm install 1.9.3 –with-openssl-dir=$rvm_path/usr And then when I try to run something along the lines of: require ‘open-uri’ open(‘https://www.google.com/’) I get the error: OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed How do I solve […]
Looks like the new rails version has “change” versus self.up and self.down methods. So what happens when one has to roll back a migration how does it know what actions to perform. I have the following method that I need to implement based on an online tutorial: class AddImageToUsers < ActiveRecord::Migration def self.up add_column :users, […]
Any idea on how to create and save a new User object with devise from the ruby console? When I tried to save it, I’m getting always false. I guess I’m missing something but I’m unable to find any related info.
I have a method in a rails helper file like this def table_for(collection, *args) options = args.extract_options! … end and I want to be able to call this method like this args = [:name, :description, :start_date, :end_date] table_for(@things, args) so that I can dynamically pass in the arguments based on a form commit. I can’t […]
I’ve gone through my app and am having trouble finding where exactly the Twitter Bootstrap source goes when I include it through a gem. If I wanted to view the Bootstrap .css for example, how do I find it? The alternative, as I understand, to including it as a gem would be do download and […]
Here is my error: rake aborted! Gem::LoadError: You have already activated rake 10.3.1, but your Gemfile requires rake 10.2.2. Prepending `bundle exec` to your command may solve this. /Users/AaronWilliamson/.gem/ruby/2.1.0/gems/bundler-1.5.3/lib/bundler/runtime.rb:34:in `block in setup’ /Users/AaronWilliamson/.gem/ruby/2.1.0/gems/bundler-1.5.3/lib/bundler/runtime.rb:19:in `setup’ /Users/AaronWilliamson/.gem/ruby/2.1.0/gems/bundler-1.5.3/lib/bundler.rb:119:in `setup’ /Users/AaronWilliamson/.gem/ruby/2.1.0/gems/bundler-1.5.3/lib/bundler/setup.rb:7:in `<top (required)>’ /Users/AaronWilliamson/Desktop/Ripelist-Classifieds/config/boot.rb:4:in `<top (required)>’ /Users/AaronWilliamson/Desktop/Ripelist-Classifieds/config/application.rb:1:in `<top (required)>’ /Users/AaronWilliamson/Desktop/Ripelist-Classifieds/Rakefile:4:in `<top (required)>’ LoadError: cannot load such file — bundler/setup […]
I want to have a form_for @user, but post to a custom action in the users controller. How can I do this?
How do I rename a file after is has been uploaded and saved? My problem is that I need to parse information about the files automatically in order to come up with the file name the file should be saved as with my application, but I can’t access the information required to generate the file […]
i need to require active record, but I am working outside of rails (here is why: Simple Ruby Input Validation Library). do I need to require the entire rails gem, or can i be DRYer?
This question already has an answer here: What is the difference between <%, <%=, <%# and -%> in ERB in Rails? 4 answers