ruby make[1]: *** [ossl_ssl.o] Error 1
Other than installing openssl, which wasn't option, install ruby without openssl:
$ ./configure prefix=/home/doug/bin/ruby --without-openssl
Ruby, Ruby on Rails
ruby make[1]: *** [ossl_ssl.o] Error 1
$ ./configure prefix=/home/doug/bin/ruby --without-openssl
#!/usr/local/bin/ruby
require 'rubygems'
require 'highline/import'
username = ask("Enter your username: ") { |q| q.echo = true }
password = ask("Enter your password: ") { |q| q.echo = "*" }
$ ruby highline.rb
Enter your username: doug
Enter your password: ******
<%= error_messages_for 'client' %>
<fieldset>
<legend>Add a Client
<% form_tag :action => "create" do %>
<p>
<label for="client_client_name">Client Name:
<%= text_field 'client', 'client_name' %>
</p>
<p>
<label for="client_id">Client Abbrv:
<%= text_field 'client', 'id' %>
</p>
<p>
<%= submit_tag 'Add' %>
</p>
<% end %>
</fieldset>
set_primary_key.
class Client < ActiveRecord::Base
set_primary_key "client_abbrv"
end
def self.table_name() "client" end
def create
@client = Client.new
@client.id = params[:client][:id]
@client.client_name = params[:client][:client_name]
if @client.save
flash[:notice] = "Client was successfully created."
redirect_to :action => 'list'
else
render :action => 'new'
end
end
@client = Client.new(params[:client])
set_primary_key, you insert data using "id" and typically select data using the actual field name, "client_abbrv" in this case.
dsparling-imbps-computer:~/my/rubydev/uclick-admin dsparlingimbp$ script/console
Loading development environment.
>> client = Client.new
=> #<Client:0x32b5e14 @new_record=true, @attributes={"client_name"=>nil}>
>> client.id = "abc"
=> "abc"
>> client.client_name = "ABC Company"
=> "ABC Company"
>> client.valid?
=> true
>> client.save
=> true