RailsCasts Pro episodes are now free!

Learn more or hide this

Sajeev Zacharias's Profile

GitHub User: sajeevzacharias4

Comments by Sajeev Zacharias

Avatar

If u want email confirmation when users sign up, add the option confirmable in the model User.rb. also in the migration uncomment the lines corresponding to confirmable.
Add the lines
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:enable_starttls_auto => true,
:address => "smtp.gmail.com",
:port => 587,
:domain => "mydomain.com",
:authentication => :login,
:user_name => "myemaiL@mydomain.com",
:password => "mypass"
}
to config/environments/development.rb

Avatar

put the below file 'import.rake' in lib/tasks
then 'rake import_hosts'

require 'csv'
task :import_hosts =>[:environment] do
file="db/tmp/hostssmall.csv"

additional_rows_to_skip = 1
CSV.foreach(file) do |row|
if additional_rows_to_skip > 0
additional_rows_to_skip-=1
else
p = Host.create!({
:ref => row[0],
:name => row[1],
:address => row[2],
}
)

end

end
end

Avatar

This does not work in my system: Ubuntu 10.04, Rails 3.2.11

But this worked:

rails new store
spree install store -A
cd store
rails s

Next the address http://localhost:3000
will give u the spree web page.
login with spree@example.com
password : spree123

u will get the admin screen.

Refer the website:
http://checkedexception.blogspot.ie/2012/05/installing-spree-from-scratch-on-ubuntu.html

Avatar

Note that link_to signout should contain :method=>delete
as shown below:

/app/views/layouts/application.html.erb

<% if user_signed_in? %>
Signed in as <%= current_user.email %>. Not you?

<%= link_to "Sign out", destroy_user_session_path, :method => :delete %>

<% else %>
<%= link_to "Sign up", new_user_registration_path %> or
<%= link_to "Sign in", new_user_session_path %>
<% end %>

Avatar

include in your gemfile
gem 'omniauth-twitter'

Avatar

rails g migration add_rpx_to_users rpx_identifier:string
gives an error. It says that there is no such file to load.

Avatar

This episode will not work in the current Rails 3.2.11 and devise 2.2.3. (January2013). So see the video in the following link. It works correctly.
http://www.slideshare.net/wleeper/devise-and-rails

Also run 'rake db:migrate' in the terminal.