<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Rails Forum - Ruby on Rails Help and Discussion Forum - Restful Authentication with all the bells and whistles (new 9/05/08)]]></title>
		<link>http://railsforum.com/viewtopic.php?id=14216</link>
		<description><![CDATA[The most recent posts in Restful Authentication with all the bells and whistles (new 9/05/08).]]></description>
		<lastBuildDate>Mon, 11 Jul 2011 13:07:18 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Restful Authentication with all the bells and whistles (new 9/05/08)]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=142144#p142144</link>
			<description><![CDATA[<p>Thanks for the tutorial - looks very good and complete....</p><p>One thing that has me a bit confused with these Authentication examples is how to set one up for a public site ( i.e. a social networking site ) and setting one up for a private admin part of a site.</p><p>Could you give me a few tips on what the key differences would be.</p>]]></description>
			<author><![CDATA[dummy@example.com (sara135)]]></author>
			<pubDate>Mon, 11 Jul 2011 13:07:18 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=142144#p142144</guid>
		</item>
		<item>
			<title><![CDATA[Re: Restful Authentication with all the bells and whistles (new 9/05/08)]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=134320#p134320</link>
			<description><![CDATA[<p>Hi:</p><p>I&#039;m trying to add new features and tests to an existing rails app that has successfully implemented the restful_authentication plugin.</p><p>However, I&#039;m using RSpec, while the original developer is using Rails built-in testing framework (we&#039;re on Rails 2.3.5.)</p><p>I&#039;m trying to test a testimonial creation controller which should only be accessible to logged in users with the &#039;administrator&#039; role. One example looks like this:</p><p>&nbsp; &nbsp; describe</p>]]></description>
			<author><![CDATA[dummy@example.com (hikari17)]]></author>
			<pubDate>Sat, 11 Dec 2010 17:20:53 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=134320#p134320</guid>
		</item>
		<item>
			<title><![CDATA[Re: Restful Authentication with all the bells and whistles (new 9/05/08)]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=133261#p133261</link>
			<description><![CDATA[<p>I am new to ruby on rails development. I need an already built app. This app is fantastic satisfies not all but every need. The problem i am facing now is that the email activation is not working . No email is sent to the signup email. I gave my google account in the config.yml file. I have no idea whats goin on....</p>]]></description>
			<author><![CDATA[dummy@example.com (saurabh1234)]]></author>
			<pubDate>Mon, 15 Nov 2010 08:57:46 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=133261#p133261</guid>
		</item>
		<item>
			<title><![CDATA[Re: Restful Authentication with all the bells and whistles (new 9/05/08)]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=129076#p129076</link>
			<description><![CDATA[<p>I have a doubt, how do we disable validation for password field in restful authentication.</p>]]></description>
			<author><![CDATA[dummy@example.com (nagendra)]]></author>
			<pubDate>Fri, 06 Aug 2010 21:07:19 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=129076#p129076</guid>
		</item>
		<item>
			<title><![CDATA[Re: Restful Authentication with all the bells and whistles (new 9/05/08)]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=116508#p116508</link>
			<description><![CDATA[<p>I followed the old tutorial outlined in post 246 and I have gotten what I want working from it, namely the admin panel.<br />My app is such that a user belongs to a specific organisation and each organisation has its own collection of movies. Each user can only view the organisation it belongs to movies&#039;.<br />I am now trying to add the functionality of the admin being able to set a user&#039;s organisation.</p><p>So the link in _user.html.erb</p><div class="codebox"><pre><code>&lt;td&gt;&lt;%= link_to &#039;edit roles&#039;, user_roles_path(user) %&gt;&lt;/td&gt;</code></pre></div><p>works perfectly but when I try to copy it and create</p><div class="codebox"><pre><code>&lt;td&gt;&lt;%= link_to &#039;edit organisation&#039;, user_organisations_path(user) %&gt;&lt;/td&gt;</code></pre></div><p>I get a no such method exists error.</p><br /><p>If I type &quot;<a href="http://127.0.0.1:3001/users/27/roles">http://127.0.0.1:3001/users/27/roles</a>&quot; into the address bar while logged in as admin, I am taken to the roles page for user 27 but if I try &quot;<a href="http://127.0.0.1:3001/users/27/organisations">http://127.0.0.1:3001/users/27/organisations</a>&quot; I get &quot;No action responded to 27. Actions: activate, create, destroy, edit, enable, index, new, show, and update&quot;.</p><p>My feeling is that this is occurring because a user has a role but a user belongs to an organisation. I&#039;ve been playing about with it for a few hours and can&#039;t figure out a way to get it so I can edit a user&#039;s organisation as admin. I can do it as the user but this is not the behaviour I want.</p><p>Any help much appreciated.</p>]]></description>
			<author><![CDATA[dummy@example.com (Cloud)]]></author>
			<pubDate>Thu, 14 Jan 2010 23:48:03 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=116508#p116508</guid>
		</item>
		<item>
			<title><![CDATA[Re: Restful Authentication with all the bells and whistles (new 9/05/08)]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=112890#p112890</link>
			<description><![CDATA[<p>@rbruhn<br />I had this running on 2.2 a few months back.&nbsp; Just built a 2.3.4 environment, moved the database and the code and the only change I had to make was renaming the application.rb controller file to application_controller.rb.&nbsp; However, I&#039;m running it in an XP environment.</p>]]></description>
			<author><![CDATA[dummy@example.com (Hankster)]]></author>
			<pubDate>Fri, 20 Nov 2009 20:21:37 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=112890#p112890</guid>
		</item>
		<item>
			<title><![CDATA[Re: Restful Authentication with all the bells and whistles (new 9/05/08)]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=112889#p112889</link>
			<description><![CDATA[<p>I started on a project using this a few months ago and had to set it aside.&nbsp; Just picked it up again and started going back through the code and found that the activation link sent after successful account creating doesn&#039;t work.&nbsp; When I look in the database, the activation code is different from what&#039;s being emailed.&nbsp; Any ideas what&#039;s happening or where to look?</p><p>Here&#039;s my debug log:<br /></p><div class="codebox"><pre><code>Processing UsersController#create (for 127.0.0.1 at 2009-11-20 14:43:30) [POST]
  Parameters: {&quot;user&quot;=&gt;{&quot;name&quot;=&gt;&quot;Fred&quot;, &quot;password_confirmation&quot;=&gt;&quot;[FILTERED]&quot;, &quot;password&quot;=&gt;&quot;[FILTERED]&quot;, &quot;login&quot;=&gt;&quot;Fred&quot;, &quot;email&quot;=&gt;&quot;fred@fred.com&quot;}, &quot;commit&quot;=&gt;&quot;Sign up&quot;, &quot;action&quot;=&gt;&quot;create&quot;, &quot;authenticity_token&quot;=&gt;&quot;2GDdzWkK+RybMkcE3NSpLUhQA8adZME9fD6WsWbiM14=&quot;, &quot;controller&quot;=&gt;&quot;users&quot;}
  [4;35;1mUser Columns (10.0ms)[0m   [0mSHOW FIELDS FROM `users`[0m
  [4;36;1mUser Load (0.0ms)[0m   [0;1mSELECT `users`.id FROM `users` WHERE (LOWER(`users`.`login`) = BINARY &#039;fred&#039;) LIMIT 1[0m
  [4;35;1mUser Load (0.0ms)[0m   [0mSELECT `users`.id FROM `users` WHERE (LOWER(`users`.`email`) = BINARY &#039;fred@fred.com&#039;) LIMIT 1[0m
  [4;36;1mSQL (0.0ms)[0m   [0;1mBEGIN[0m
  [4;35;1mUser Create (0.0ms)[0m   [0mINSERT INTO `users` (`name`, `salt`, `updated_at`, `activated_at`, `crypted_password`, `deleted_at`, `remember_token_expires_at`, `activation_code`, `password_reset_code`, `updated_by`, `remember_token`, `login`, `email`, `created_at`, `state`) VALUES(&#039;Fred&#039;, &#039;3bbb29ee289da0cebb2098cbefc44dcffcce2711&#039;, &#039;2009-11-20 20:43:30&#039;, NULL, &#039;21f0bfd69d7f5826d46db650ac9a33a33a0d3909&#039;, NULL, NULL, &#039;1e49dff90d979b2f8e9145a588a6ff673fdafb13&#039;, NULL, NULL, NULL, &#039;Fred&#039;, &#039;fred@fred.com&#039;, &#039;2009-11-20 20:43:30&#039;, &#039;pending&#039;)[0m
Sent mail to fred@fred.com

Date: Fri, 20 Nov 2009 14:43:30 -0600

From: admin@mydomain.com

To: fred@fred.com

Subject: Please activate your new account

Mime-Version: 1.0

Content-Type: text/plain; charset=utf-8



Your account has been created.

  Username: Fred
  Password: 123456

Visit this url to activate your account:

  http://localhost:3000/activate/4441833e2ad6c7fe8513634c0b3c0777bfe01bb4</code></pre></div><br /><br /><br /><p>SOLVED:&nbsp; Found the answer:&nbsp; Need to include &quot;user.reload&quot; in the user_observer after_create definition</p>]]></description>
			<author><![CDATA[dummy@example.com (Hankster)]]></author>
			<pubDate>Fri, 20 Nov 2009 20:17:18 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=112889#p112889</guid>
		</item>
		<item>
			<title><![CDATA[Re: Restful Authentication with all the bells and whistles (new 9/05/08)]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=111815#p111815</link>
			<description><![CDATA[<p>I can&#039;t seem to get this running either. Is the package and tutorial still viable for v2.3.4?</p><p>I set this up as a project in Aptana Rails and it reports &quot;No Rake Tasks found. Likely cause is no Rakefile for project.&quot; Of course, there is a rake file.</p><p>Starting the server gives me this error:</p><div class="codebox"><pre><code>C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require&#039;: no such file to load -- ./script/../config/../vendor/rails/railties/lib/initializer (LoadError)
  from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require&#039;
  from ./script/../config/boot.rb:45:in `load_initializer&#039;
  from ./script/../config/boot.rb:38:in `run&#039;
  from ./script/../config/boot.rb:11:in `boot!&#039;
  from ./script/../config/boot.rb:110
  from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require&#039;
  from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require&#039;
  from ./script/server:2
  from -e:2:in `load&#039;
  from -e:2</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (rbruhn)]]></author>
			<pubDate>Mon, 09 Nov 2009 13:35:39 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=111815#p111815</guid>
		</item>
		<item>
			<title><![CDATA[Re: Restful Authentication with all the bells and whistles (new 9/05/08)]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=111757#p111757</link>
			<description><![CDATA[<p>Hi there,<br />I getting a migration error when trying to set up the tutorial. </p><p>db:create works fine, but db:migrate throws:</p><div class="codebox"><pre><code>rake aborted!
Mysql::Error: Error on rename of &#039;./test_development/schema_migrations&#039; to &#039;./test_development/#sql2-22d3-c&#039; (errno: -1): CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)</code></pre></div><p>I can&#039;t seem to track down the problem, can anyone point me in the right direction. I&#039;m running Mac OS 10.5, MySQL 5.1.34 and Rails 2.3.4</p><p>Any help would be much appreciated,</p><p>Kieran</p>]]></description>
			<author><![CDATA[dummy@example.com (kieranmasterton)]]></author>
			<pubDate>Sat, 07 Nov 2009 22:44:13 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=111757#p111757</guid>
		</item>
		<item>
			<title><![CDATA[Re: Restful Authentication with all the bells and whistles (new 9/05/08)]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=108493#p108493</link>
			<description><![CDATA[<p>I&#039;m having a bit of a strange issue.&nbsp; I have the tutorial installed and functioning perfectly, except that it takes my system about 60 seconds to process when creating a new user.&nbsp; Besides this long delay in creating a user, everything works great.</p><p>I&#039;m on a fast machine and not seeing any delays besides this issue.&nbsp; I&#039;ve been testing the app extensively for 2 days and not having any other issues.&nbsp; Not getting any errors in the log either.</p><p>It just takes about 60 seconds to process a new user and send the activation email.&nbsp; Has anybody else had this problem?&nbsp; Any ideas about what might be causing this?</p>]]></description>
			<author><![CDATA[dummy@example.com (mikeh)]]></author>
			<pubDate>Sun, 13 Sep 2009 10:59:44 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=108493#p108493</guid>
		</item>
		<item>
			<title><![CDATA[Re: Restful Authentication with all the bells and whistles (new 9/05/08)]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=108481#p108481</link>
			<description><![CDATA[<p>I still can&#039;t get restful_authentication running and my project is behind, any advice would be grateful. I was able to install mysql but now when I run script/server I get this error.<br /></p><div class="codebox"><pre><code>=&gt; Booting Mongrel
=&gt; Rails 2.3.2 application starting on http://0.0.0.0:3000
/Applications/MAMP/htdocs/Rails/restful_authentication_tutorial/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:576:in `real_connect&#039;: Can&#039;t connect to local MySQL server through socket &#039;/var/run/mysqld/mysqld.sock&#039; (2) (Mysql::Error)
  from /Applications/MAMP/htdocs/Rails/restful_authentication_tutorial/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:576:in `connect&#039;
  from /Applications/MAMP/htdocs/Rails/restful_authentication_tutorial/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:204:in `initialize&#039;
  from /Applications/MAMP/htdocs/Rails/restful_authentication_tutorial/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:76:in `new&#039;
  from /Applications/MAMP/htdocs/Rails/restful_authentication_tutorial/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:76:in `mysql_connection&#039;
  from /Applications/MAMP/htdocs/Rails/restful_authentication_tutorial/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `send&#039;
  from /Applications/MAMP/htdocs/Rails/restful_authentication_tutorial/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection&#039;
  from /Applications/MAMP/htdocs/Rails/restful_authentication_tutorial/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection&#039;
  from /Applications/MAMP/htdocs/Rails/restful_authentication_tutorial/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout&#039;
   ... 26 levels...
  from /Applications/MAMP/htdocs/Rails/restful_authentication_tutorial/vendor/rails/railties/lib/commands/server.rb:84
  from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require&#039;
  from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require&#039;
  from script/server:3</code></pre></div><p>I&#039;m wondering if it is a socket configuration problem. I tried to run &quot;mysql_config --socket&quot; but the console gives me this<br /></p><div class="codebox"><pre><code>-bash: mysql_config: command not found</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (boilerpa)]]></author>
			<pubDate>Sun, 13 Sep 2009 02:56:04 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=108481#p108481</guid>
		</item>
		<item>
			<title><![CDATA[Re: Restful Authentication with all the bells and whistles (new 9/05/08)]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=108137#p108137</link>
			<description><![CDATA[<p>Found the answer to my second question about application.rb, it is in the application_controller.rb.</p>]]></description>
			<author><![CDATA[dummy@example.com (boilerpa)]]></author>
			<pubDate>Sat, 05 Sep 2009 22:58:42 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=108137#p108137</guid>
		</item>
		<item>
			<title><![CDATA[Re: Restful Authentication with all the bells and whistles (new 9/05/08)]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=108129#p108129</link>
			<description><![CDATA[<p>In addition to my problem with mysql above, I don&#039;t see where I make the change to application.rb as explained in the tutorial.<br /></p><div class="codebox"><pre><code>-Change contact_site method in application.rb to redirect to your site&#039;s contact form or info</code></pre></div><p>I see three files named application.rb and none have a method called contact_site.</p><p>Thanks.</p>]]></description>
			<author><![CDATA[dummy@example.com (boilerpa)]]></author>
			<pubDate>Sat, 05 Sep 2009 18:35:11 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=108129#p108129</guid>
		</item>
		<item>
			<title><![CDATA[Re: Restful Authentication with all the bells and whistles (new 9/05/08)]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=108120#p108120</link>
			<description><![CDATA[<p>Hi, I&#039;m new to Rails and restful authentication.</p><p>I&#039;m following the tutorial, when I get to the setup database.yml part and I attempt to install the mysql gem I get this error. </p><div class="codebox"><pre><code>ERROR:  Error installing mysql:
  ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb --with-mysql-config=/usr/local/mysql/bin/mysql_config
extconf.rb:10: command not found: /usr/local/mysql/bin/mysql_config --cflags
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
  --with-opt-dir
  --without-opt-dir
  --with-opt-include
  --without-opt-include=${opt-dir}/include
  --with-opt-lib
  --without-opt-lib=${opt-dir}/lib
  --with-make-prog
  --without-make-prog
  --srcdir=.
  --curdir
  --ruby=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  --with-mysql-config


Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/mysql-2.8.1 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out</code></pre></div><p>I&#039;m running on Leopard, so I&#039;m using the Leopard command shown in the database sample<br /></p><div class="codebox"><pre><code>sudo env ARCHFLAGS=&quot;-arch i386&quot; gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config</code></pre></div><p>Thanks for any help.</p>]]></description>
			<author><![CDATA[dummy@example.com (boilerpa)]]></author>
			<pubDate>Sat, 05 Sep 2009 15:13:50 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=108120#p108120</guid>
		</item>
		<item>
			<title><![CDATA[Re: Restful Authentication with all the bells and whistles (new 9/05/08)]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=107017#p107017</link>
			<description><![CDATA[<div class="quotebox"><cite>agm_ultimatex wrote:</cite><blockquote><p>Tried to get the restful app itself working, rather than my own. I edited the database.yml file, and I could not run the rake db:create, heres the error:</p><div class="codebox"><pre><code>no such file to load -- spec/rake/spectask
/home/aaron/Documents/rails/restful_authentication_tutorial/Rakefile:10:in `require&#039;</code></pre></div><p>I did however manage to fix my previous error. Added a couple lines from the given environment file to mine, and grabbed the config.yml. <img src="http://railsforum.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p></blockquote></div><p>Managed to fix that. If you have the same problem, change line 7 in the rspec.rake file under lib/tasks to: <br /></p><div class="codebox"><pre><code>rspec_base = File.expand_path(File.dirname(__FILE__) + &#039;/../../vendor/gems/rspec-1.1.12/lib&#039;)</code></pre></div><p>That way it points to the installed gem rather than a non-existent plugin folder. Thanks to Adam Salter&#039;s comment on <a href="http://jimneath.org/2008/09/09/bort-base-rails-application/">http://jimneath.org/2008/09/09/bort-bas &#133; plication/</a></p>]]></description>
			<author><![CDATA[dummy@example.com (agm_ultimatex)]]></author>
			<pubDate>Thu, 20 Aug 2009 16:57:56 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=107017#p107017</guid>
		</item>
	</channel>
</rss>
