No hay de que

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú

rails new TestPaperclipcd TestPaperclipclass CreateProducts < ActiveRecord::Migration
def change
create_table :products do |t|
t.string :name
t.text :description
t.timestamps
end
add_attachment :products, :image
end
endclass Product < ActiveRecord::Base
has_attached_file :image, styles: { medium: '200x200>', thumb: '48x48>' }
end<div class="field">
<%= f.label :image %>
<%= f.file_field :image %>
</div>def product_params
params.require(:product).permit(:name, :description, :image)
endrails s
sudo apt-get install git zlib1g zlib1g-dev sqlite3 libsqlite3-dev cd ~ git clone [url]https://github.com/sstephenson/rbenv[/url] ~/.rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc exec #SHELL git clone [url]https://github.com/sstephenson/ruby-build [/url]
cd ruby-build
sudo ./install.sh
cd ~ rbenv install 1.9.3-p194
rbenv global 1.9.3-p194 gem install bundler rails sqlite3-ruby execjs therubyracer
rbenv rehash /usr/bin/ruby -e "$(/usr/bin/curl -fsSL [url]https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb[/url])" brew install git sqlite3 cd ~
git clone[url] https://github.com/sstephenson/rbenv ~/.rbenv [/url]
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile exec #SHELL git clone[url] https://github.com/sstephenson/ruby-build [/url]
cd ruby-build
sudo ./install.sh cd ~ rbenv install 1.9.3-p194
rbenv global 1.9.3-p194 gem install bundler rails sqlite3-ruby
rbenv rehash git config --global user.name "Mi nombre completo" git config --global user.email "mi correo"
ssh-keygen -t rsa -C "mi correo" 

rails new Proyecto -d sqlite3cd Proyectorails g scaffold persona nombre rake db:migraterails s


print "¿Cual es tu apellido?"
apellido= gets.chomp
puts "!Tu apellido es #{apellido}"
print "¿De que ciudad eres?"
ciudad= gets.chomp
puts "Vives en la #{ciudad}"
print "¿De Que estado o provincia eres?" #Puede abreviar el estado ejemplo NY para New York
estado= gets.chomp
estado.upcase!
puts "¡Tu apellido es #{apellido} eres de #{ciudad} perteneciente a #{estado}!"

Irb [enter]Irb(main):001:0>require 'WIN32OLE' [enter]
app = WIN32OLE::new('excel.application') [enter]
app.visible = true [enter]
app.workbooks.add [enter]
app.activeworkbook.activesheet.range('a1:a10').value = "Hola desde Ruby" * 2 [enter]
app.displayalerts = false [enter]
app.quit [enter]
require 'win32ole'
excel = WIN32OLE.new('Excel.Application')
excel.visible = true
workbook = excel.Workbooks.Add();
worksheet = workbook.Worksheets(1);
worksheet.Range("A1:D1").value = ["North","South","East","West"];
worksheet.Range("A2:B2").value = [5.2, 10];
worksheet.Range("C2").value = 8;
worksheet.Range("D2").value = 20;
range = worksheet.Range("A1:D2");
range.select
chart = workbook.Charts.Add;
workbook.saved = true;
excel.ActiveWorkbook.Close(0);
excel.Quit();excel = WIN32OLE.new('Excel.Application')excel = WIN32OLE.connect('Excel.Application')