Ruby on Rails Monday, December 31, 2012

On Sun, Dec 30, 2012 at 7:59 PM, <sfnatureguy@gmail.com> wrote:

> As a user, I can add my favorite book to my book list.
> Another user adds the same book to their book list.
>
> There should only be one instance of the book in the database but 2
> user/book associations.

When someone wants to add their favorite, check the database to see if
it exists. What's the problem?

-Dave

--
Dave Aronson, the T. Rex of Codosaurus LLC,
secret-cleared freelance software developer
taking contracts in or near NoVa or remote.
See information at http://www.Codosaur.us/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

Maheswari Bala wrote in post #1090711:
> I have a four tabs along with the menus in the left hand side. on
> clicking each tab will populate corresponding data in the table.I need
> to write a ajax method to refresh each tabs for every 5 minutes. Can
> someone help with an example.

http://www.w3schools.com/jsref/met_win_setinterval.asp

I am assuming you know how to make a AJAX call. The above will explain
how to set an interval to call your function periodically.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

On 31 December 2012 05:18, Aurick <ashutosh.raushan@indusnet.co.in> wrote:
> Hello,
> I am working on rails project and I want to send mail those person whose
> name I have uploaded in excel file and their photos through paperclip.And my
> mail format is on their anniversary automatic mail send by application and
> mail contain his/her photo as well as information regarding that particular
> one from excel sheet .

Look at the spreadsheet gem for reading excel files.

Colin

>
> I am stuck with it,it is possible or not?
>
> Thank you in advance!!!
>
> Aurick
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/rubyonrails-talk/-/AsTgLyDDFZoJ.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

Sure, it's very much possible. However, you need to post exactly what steps you've taken, and where exactly you're facing the problem, in order for the community to help you in any way :)

-- 
Dheeraj Kumar

On Monday 31 December 2012 at 10:48 AM, Aurick wrote:

Hello,
I am working on rails project and I want to send mail those person whose name I have uploaded in excel file and their photos through paperclip.And my mail format is on their anniversary automatic mail send by application and mail contain his/her photo as well as information regarding that particular one from excel sheet .

I am stuck with it,it is possible or not?

Thank you in advance!!!

Aurick

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/AsTgLyDDFZoJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails

I have a four tabs along with the menus in the left hand side. on
clicking each tab will populate corresponding data in the table.I need
to write a ajax method to refresh each tabs for every 5 minutes. Can
someone help with an example.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

yes I know

On Mon, Dec 31, 2012 at 3:56 PM, Dheeraj Kumar <a.dheeraj.kumar@gmail.com> wrote:
Instead of adding a session parameter to every url_for call, alias method chain it. any url helper calls url_for anyway, so you're good.

Make sure the encryption is good with the session id, and don't use weak ones like base64, they make session spoofing so much easier.

-- 
Dheeraj Kumar

On Monday 31 December 2012 at 3:49 PM, Rajarshi wrote:

url_for(:controller => "name of the controller", :action => "name pf the aciont", :session => params[:value])

or

users_url(:session => params[:value])
it will create a dybnamic url like /users?session="sdsadsadasdas213213213"

and in params[:value] you have to encrypt the session id what you get from database
or encode64(params[:value])

now while it i s hitting it will send the request in that reuqest you have to parse it by decode64() and match the session id


On Mon, Dec 31, 2012 at 2:10 PM, Rajesh KT <lists@ruby-forum.com> wrote:
Dheeraj Kumar wrote in post #1090693:
> I just said what you need. chain the url_for method to add session id to
> the parameters, and read the session id in your application controller,
> look it up in your session store, active record or memcache, then load
> whatever information you want from the database.
>
> --
> Dheeraj Kumar

Thanks Dheeraj. Truly appreciate if you can point me to some code
examples for this.

Thanks

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails

Instead of adding a session parameter to every url_for call, alias method chain it. any url helper calls url_for anyway, so you're good.

Make sure the encryption is good with the session id, and don't use weak ones like base64, they make session spoofing so much easier.

-- 
Dheeraj Kumar

On Monday 31 December 2012 at 3:49 PM, Rajarshi wrote:

url_for(:controller => "name of the controller", :action => "name pf the aciont", :session => params[:value])

or

users_url(:session => params[:value])
it will create a dybnamic url like /users?session="sdsadsadasdas213213213"

and in params[:value] you have to encrypt the session id what you get from database
or encode64(params[:value])

now while it i s hitting it will send the request in that reuqest you have to parse it by decode64() and match the session id


On Mon, Dec 31, 2012 at 2:10 PM, Rajesh KT <lists@ruby-forum.com> wrote:
Dheeraj Kumar wrote in post #1090693:
> I just said what you need. chain the url_for method to add session id to
> the parameters, and read the session id in your application controller,
> look it up in your session store, active record or memcache, then load
> whatever information you want from the database.
>
> --
> Dheeraj Kumar

Thanks Dheeraj. Truly appreciate if you can point me to some code
examples for this.

Thanks

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails

url_for(:controller => "name of the controller", :action => "name pf the aciont", :session => params[:value])

or

users_url(:session => params[:value])
it will create a dybnamic url like /users?session="sdsadsadasdas213213213"

and in params[:value] you have to encrypt the session id what you get from database
or encode64(params[:value])

now while it i s hitting it will send the request in that reuqest you have to parse it by decode64() and match the session id


On Mon, Dec 31, 2012 at 2:10 PM, Rajesh KT <lists@ruby-forum.com> wrote:
Dheeraj Kumar wrote in post #1090693:
> I just said what you need. chain the url_for method to add session id to
> the parameters, and read the session id in your application controller,
> look it up in your session store, active record or memcache, then load
> whatever information you want from the database.
>
> --
> Dheeraj Kumar

Thanks Dheeraj. Truly appreciate if you can point me to some code
examples for this.

Thanks

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails

Dheeraj Kumar wrote in post #1090693:
> I just said what you need. chain the url_for method to add session id to
> the parameters, and read the session id in your application controller,
> look it up in your session store, active record or memcache, then load
> whatever information you want from the database.
>
> --
> Dheeraj Kumar

Thanks Dheeraj. Truly appreciate if you can point me to some code
examples for this.

Thanks

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

https://devcenter.heroku.com/articles/heroku-postgresql#connecting-in-ruby



On Mon, Dec 31, 2012 at 1:56 PM, Rajarshi <rdas2576@gmail.com> wrote:
heroku support 

postgrel


for that you have to use
"pg" gem

in your genfile chnage it

gem "pg"

then commit and git push heroku master

after that you have to get the username password and databae name from heroku


On Sat, Dec 29, 2012 at 12:31 AM, Javier Quarite <jquarites@gmail.com> wrote:



On Fri, Dec 28, 2012 at 1:39 PM, Eddy Maue <lists@ruby-forum.com> wrote:

       An error occurred while installing sqlite3 (1.3.6), and Bundler
cannot co
ntinue.
       Make sure that `gem install sqlite3 -v '1.3.6'` succeeds before
bundling.

Heroku doesn't support sqlite
(or maybe post your Gemfile)

Javier 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails

heroku support 


postgrel


for that you have to use
"pg" gem

in your genfile chnage it

gem "pg"

then commit and git push heroku master

after that you have to get the username password and databae name from heroku


On Sat, Dec 29, 2012 at 12:31 AM, Javier Quarite <jquarites@gmail.com> wrote:



On Fri, Dec 28, 2012 at 1:39 PM, Eddy Maue <lists@ruby-forum.com> wrote:

       An error occurred while installing sqlite3 (1.3.6), and Bundler
cannot co
ntinue.
       Make sure that `gem install sqlite3 -v '1.3.6'` succeeds before
bundling.

Heroku doesn't support sqlite
(or maybe post your Gemfile)

Javier 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails

I just said what you need. chain the url_for method to add session id to the parameters, and read the session id in your application controller, look it up in your session store, active record or memcache, then load whatever information you want from the database.

-- 
Dheeraj Kumar

On Monday 31 December 2012 at 1:44 PM, Rajarshi wrote:

you can send encrypted session id for that 

your url should be like /users?session_id='dasdadasdas2313124213213_session_application" with encrypted session id

now after getting request you have to decrypt the session 
use base64 for it

On Mon, Dec 31, 2012 at 1:15 PM, Rajesh KT <lists@ruby-forum.com> wrote:
Dheeraj Kumar wrote in post #1090690:
> It's not secure, session spoofing is a serious issue. I would encourage
> not going that route.
>
> It can be done in rails, needs a bit of work but sure. Ideally, you'll
> alias_method_chain url_for and read the session in a parent controller,
> like ApplicationController and initialize your current user and any
> other session information from that.
>
> --
> Dheeraj Kumar

Please suggest which route to follow, in order to make application work
even though cookies are disabled in the browser.

Thanks in advance for any help in this line.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails

you can send encrypted session id for that 

your url should be like /users?session_id='dasdadasdas2313124213213_session_application" with encrypted session id

now after getting request you have to decrypt the session 
use base64 for it

On Mon, Dec 31, 2012 at 1:15 PM, Rajesh KT <lists@ruby-forum.com> wrote:
Dheeraj Kumar wrote in post #1090690:
> It's not secure, session spoofing is a serious issue. I would encourage
> not going that route.
>
> It can be done in rails, needs a bit of work but sure. Ideally, you'll
> alias_method_chain url_for and read the session in a parent controller,
> like ApplicationController and initialize your current user and any
> other session information from that.
>
> --
> Dheeraj Kumar

Please suggest which route to follow, in order to make application work
even though cookies are disabled in the browser.

Thanks in advance for any help in this line.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails Sunday, December 30, 2012

Dheeraj Kumar wrote in post #1090690:
> It's not secure, session spoofing is a serious issue. I would encourage
> not going that route.
>
> It can be done in rails, needs a bit of work but sure. Ideally, you'll
> alias_method_chain url_for and read the session in a parent controller,
> like ApplicationController and initialize your current user and any
> other session information from that.
>
> --
> Dheeraj Kumar

Please suggest which route to follow, in order to make application work
even though cookies are disabled in the browser.

Thanks in advance for any help in this line.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

It's not secure, session spoofing is a serious issue. I would encourage not going that route. 

It can be done in rails, needs a bit of work but sure. Ideally, you'll alias_method_chain url_for and read the session in a parent controller, like ApplicationController and initialize your current user and any other session information from that.

-- 
Dheeraj Kumar

On Monday 31 December 2012 at 12:52 PM, Rajesh KT wrote:

Shiv Narayan Gautam wrote in post #1090687:
Try passing it in the URL. Read more about URL rewriting in case of
disabled cookies.

It has some disadvantages.

--
Shiv

Can this be done in Ruby on Rails? I am aware that it works for JSP and
PHP.

--

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails

Shiv Narayan Gautam wrote in post #1090687:
> Try passing it in the URL. Read more about URL rewriting in case of
> disabled cookies.
>
> It has some disadvantages.
> http://www.javapractices.com/topic/TopicAction.do?Id=226
>
> --
> Shiv

Can this be done in Ruby on Rails? I am aware that it works for JSP and
PHP.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

You cannot use sessions without cookies enabled.

That said, you might remember what PHP does with the PHPSESSIONID parameter appended to all URLs rendered in the page. You might want to do something similar.

-- 
Dheeraj Kumar

On Monday 31 December 2012 at 12:43 PM, Rajesh KT wrote:

Rajarshi wrote in post #1090684:
you can use many option
1. memcache to store session in server
2.Activerecord to store session id in database so no need of your
browser

many others

I am using Activerecord only to store the session, but in some way
client has to send that session ID to server to retrieve the logged-in
session data, otherwise each time server will create a new session ID.
Right?

--

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails

Try passing it in the URL. Read more about URL rewriting in case of disabled cookies. 


--
Shiv


On Mon, Dec 31, 2012 at 12:43 PM, Rajesh KT <lists@ruby-forum.com> wrote:
Rajarshi wrote in post #1090684:
> you can use many option
> 1. memcache to store  session in server
> 2.Activerecord to store session id in database so no need of your
> browser
>
> many others

I am using Activerecord only to store the session, but in some way
client has to send that session ID to server to retrieve the logged-in
session data, otherwise each time server will create a new session ID.
Right?

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails

Rajarshi wrote in post #1090684:
> you can use many option
> 1. memcache to store session in server
> 2.Activerecord to store session id in database so no need of your
> browser
>
> many others

I am using Activerecord only to store the session, but in some way
client has to send that session ID to server to retrieve the logged-in
session data, otherwise each time server will create a new session ID.
Right?

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

you can use many option
1. memcache to store  session in server
2.Activerecord to store session id in database so no need of your browser

many others

On Mon, Dec 31, 2012 at 12:09 PM, Rajesh KT <lists@ruby-forum.com> wrote:
Rajarshi wrote in post #1090682:
> Session is like an hash to store data with an application request.
>
> It should work if you store a session while login like
> session[:user]="Myname_123"
>  it will renmain in the application until or unless you make it nil
> session[:user]=nil
>
> it is versy simple in consept
>
> now session id it is identification of an particular session
>
> and browser you know I use session in android emulator
>
> now your turn

Thanks Rajarshi for your reply!
But that's not my question is - let me put in other way:
If I am using sessionstore, the _session_id has to be passed through
browser cookie. Now, If I disable cookie in the browser the entire
system doesn't work. So, what is the other alternative I can pass the
session id through? if cookie is disabled.
Tried passing as request parameter, but that doesn't work. Any
suggestion plese?

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails

Rajarshi wrote in post #1090682:
> Session is like an hash to store data with an application request.
>
> It should work if you store a session while login like
> session[:user]="Myname_123"
> it will renmain in the application until or unless you make it nil
> session[:user]=nil
>
> it is versy simple in consept
>
> now session id it is identification of an particular session
>
> and browser you know I use session in android emulator
>
> now your turn

Thanks Rajarshi for your reply!
But that's not my question is - let me put in other way:
If I am using sessionstore, the _session_id has to be passed through
browser cookie. Now, If I disable cookie in the browser the entire
system doesn't work. So, what is the other alternative I can pass the
session id through? if cookie is disabled.
Tried passing as request parameter, but that doesn't work. Any
suggestion plese?

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

Session is like an hash to store data with an application request.

It should work if you store a session while login like session[:user]="Myname_123"
 it will renmain in the application until or unless you make it nil
session[:user]=nil

it is versy simple in consept

now session id it is identification of an particular session

and browser you know I use session in android emulator

now your turn

On Sun, Dec 30, 2012 at 4:19 PM, Rajesh KT <lists@ruby-forum.com> wrote:
My requirement is to make a controller method to be able to accept
session id from cookie, if it is disabled/not available then from
request body.

This way I will return a session id from login request and use the same
session_id for any subsequent request body, if it's not a browser
request.

Will this work?

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails

Hello,

I am working on rails project and I want to send mail those person whose name I have uploaded in excel file and their photos through paperclip.And my mail format is on their anniversary automatic mail send by application and mail contain his/her photo as well as information regarding that particular one from excel sheet .

I am stuck with it,it is possible or not?

Thank you in advance!!!

Aurick

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/AsTgLyDDFZoJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails

I just posted a question on stackoverflow:

http://stackoverflow.com/questions/14096008/has-many-through-but-with-unique-source-and-multiple-associations

The gist of what I need help with is this:
  • As a user, I can add my favorite book to my book list.
  • Another user adds the same book to their book list.
  • There should only be one instance of the book in the database but 2 user/book associations.


    Any help would be amazing!


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/8xReZsFy1_cJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails



On Saturday, December 29, 2012 9:34:43 PM UTC, wnt2bsleepin wrote:

Hello, I am having a hard time using a model I created. I am trying to call
the object from a class in the lib directory. This class is going to run on
a schedule with clockwork to repopulate a database. However, I can't seem to
access the model.


You need to load the rails environment ( config/environment ) to be able to use your models

Fred




--
View this message in context: http://ruby.11.n6.nabble.com/uninitialized-constant-UgloungeSkills-NameError-tp4985745.html
Sent from the RubyOnRails Users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/GEqPZZRZBGoJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails

My requirement is to make a controller method to be able to accept
session id from cookie, if it is disabled/not available then from
request body.

This way I will return a session id from login request and use the same
session_id for any subsequent request body, if it's not a browser
request.

Will this work?

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails Saturday, December 29, 2012



On Sunday, 20 May 2012 19:26:08 UTC-4, Anish wrote:

I have an existing rails backend website which makes json ajax calls to my server and I was passing csrf tokens in every ajax call. Now,I am developing a mobile iOS app to use the same backend and send calls in json. However, mobile requests are failing with "Can't verify CSRF token authenticity", because i dont know of anyway to send the csrf token to rails from app.

Looking around, many people are suggesting to disable CSRF protection if the call is json call - but I dont want to do that because my website all uses json calls and that leaves my site open for attacks. 

My question is:

1) How can i let my iOS app know the rails generated csrf token to use it in all app calls to server? Is it possible

2) Is there any other way that I can work around this problem? 



Since this thread has been revived, it seems reasonable to mention that you may not want to use session state in your API at all - some HTTP clients may not support it out-of-the-box, etc. Oauth or Oauth2 is a possible alternative - there are some very slick gems to help with this (devise_oauth2_providable, among others). 

--Matt Jones

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/RdU4jgc9qroJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails

Hello, I am having a hard time using a model I created. I am trying to call
the object from a class in the lib directory. This class is going to run on
a schedule with clockwork to repopulate a database. However, I can't seem to
access the model.

Here <http://pastebin.com/8TiB7hTX> is the object that is trying to call
the model. Any help is appreciated.



--
View this message in context: http://ruby.11.n6.nabble.com/uninitialized-constant-UgloungeSkills-NameError-tp4985745.html
Sent from the RubyOnRails Users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

The problem is solved! see http://stackoverflow.com/questions/14029119/installing-ruby-1-9-3-in-michael-hartls-ruby-on-rails-tutorial/14085987#14085987


On Friday, December 28, 2012 1:30:05 PM UTC-5, Adam Zerner wrote:

I'm working on Michael Hartl's ruby on rails tutorial http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec-development_tools.

I installed Git, updated my OS to 10.8.2 and downloaded XCode 4.5.2.

when I type in

rvm install 1.9.3  

this long thing comes up...

Ruby (and needed base gems) for your selection will be installed shortly.  Before it happens, please read and execute the instructions below.  Please use a separate terminal to execute any additional commands.      Notes for Mac OS X 10.8.2, Xcode 4.5.2.    For JRuby:  Install the JDK. See http://developer.apple.com/java/download/  # Current Java version "1.6.0_26"  For IronRuby: Install Mono >= 2.6  For Ruby 1.9.3: Install libksba # If using Homebrew, 'brew install libksba'  For Opal: Install Nodejs with NPM. See http://nodejs.org/download/    To use an RVM installed Ruby as default, instead of the system ruby:        rvm install 1.8.7 # installs patch 357: closest supported version      rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system.gems # migrate your gems      rvm alias create default 1.8.7    And reopen your terminal windows.    Xcode and gcc:    Right now Ruby requires gcc to compile, but Xcode 4.2 and later no longer ship with gcc. Instead they ship with llvm-gcc (to which gcc is a symlink) and clang, neither of which are supported for building Ruby. Xcode 4.1 was the last version to ship gcc, which was /usr/bin/gcc-4.2.    Xcode 4.1 and earlier:  - Ruby will build fine.    Xcode 4.2 and later (including Command Line Tools for Xcode):  - If you have gcc-4.2 (and friends) from an earlier Xcode version, Ruby will build fine.  - If you don't have gcc-4.2, you have two options to get it:   * Install apple-gcc42 from Homebrew   * Install osx-gcc-installer      Homebrew:      If you are using Homebrew, you can install the apple-gcc42 and required libraries from homebrew/dupes:          brew update        brew tap homebrew/dupes        brew install autoconf automake apple-gcc42        rvm pkg install openssl      Xcode 4.2+ install or/and Command Line Tools for Xcode is required to provide make and other tools.      osx-gcc-installer:      If you don't use Homebrew, you can download and install osx-gcc-installer: https://github.com/kennethreitz/osx-gcc-installer.      Warning: Installing osx-gcc-installer on top of a recent Xcode is known to cause problems, so you must uninstall Xcode before installing osx-gcc-installer. Afterwards you may install Xcode 4.2+ or Command Line Tools for Xcode if you desire.      ** NOTE: Currently, Node.js is having issues building with osx-gcc-installer. The only fix is to install Xcode over osx-gcc-installer.    Press 'q' to continue.  ~  (END)   

Originally I had to get homebrew and

brew install libksba  

but I did that already and it works. That leads to "Xcode and gcc:" and everything below it.

So, I have homebrew, and the following three commands work:

  brew update    brew tap homebrew/dupes    brew install autoconf automake apple-gcc42  

But when I try

rvm pkg install openssl  

this is what happens

Fetching openssl-1.0.1c.tar.gz to /Users/adamzerner/.rvm/archives  Extracting openssl to /Users/adamzerner/.rvm/src/openssl-1.0.1c  Configuring openssl in /Users/adamzerner/.rvm/src/openssl-1.0.1c.  Compiling openssl in /Users/adamzerner/.rvm/src/openssl-1.0.1c.  Error running 'make', please read /Users/adamzerner/.rvm/log/openssl/make.log    Please note that it's required to reinstall all rubies:        rvm reinstall all --force    Updating openssl certificates  Error running 'update_openssl_certs', please read /Users/adamzerner/.rvm/log/openssl.certs.log  

And this is what happens when I try what it says...

Adam-Zerners-MacBook-Pro:~ adamzerner$ rvm reinstall all --force  Adam-Zerners-MacBook-Pro:~ adamzerner$   

some other information...

I don't see a .rvm folder under adamzerner, so I can't read what it tells me to (not that I would understand what I'd be reading anyway).

It seems that I have 1.8.7 installed:

Adam-Zerners-MacBook-Pro:~ adamzerner$ ruby -v  ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]  

So... to summarize... when I try to run

rvm install 1.9.3  

I get the gcc/Xcode problem. To fix that it says to download apple-gcc42 from Homebrew. When I do that, I get a problem after doing

rvm pkg install openssl  

The problem being that I need to reinstall all rubies. When I do that:

rvm reinstall all --force  

it seems that nothing happens.

Thanks in advance to anyone willing to help me with this problem!

EDIT: I forgot to say this before. For the "long thing" up above, when I press q to continue, this is what happens...

Searching for binary rubies, this might take some time.  https://rvm.io/binaries/osx/10.8/x86_64/ruby-1.9.3-p327.tar.bz2 - #configure  ruby-1.9.3-p327 - #download  ruby-1.9.3-p327 - #extract  ruby-1.9.3-p327 - #validate  Libraries missing for ruby-1.9.3-p327: env. Refer to your system manual for installing libraries  Mounting remote ruby failed, trying to compile.  Fetching yaml-0.1.4.tar.gz to /Users/adamzerner/.rvm/archives  Extracting yaml to /Users/adamzerner/.rvm/src/yaml-0.1.4  Configuring yaml in /Users/adamzerner/.rvm/src/yaml-0.1.4.  Error running './configure --prefix=/Users/adamzerner/.rvm/usr', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/yaml/configure.log  Compiling yaml in /Users/adamzerner/.rvm/src/yaml-0.1.4.  Error running 'make', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/yaml/make.log  Installing Ruby from source to: /Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327, this may take a while depending on your cpu(s)...  ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while depending on your connection...  ruby-1.9.3-p327 - #extracted to /Users/adamzerner/.rvm/src/ruby-1.9.3-p327 (already extracted)  ruby-1.9.3-p327 - #configuring  Error running './configure --enable-shared --disable-install-doc --prefix=/Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327 --with-opt-dir=/Users/adamzerner/.rvm/usr', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/configure.log  There has been an error while running configure. Halting the installation.  

what happens when you sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc and re run the ruby install? – Oliver Atkinson Dec 25 at 10:35
Does the solution is this StackOverflow thread work for you? – Paul Fioravanti Dec 25 at 11:35
<td class="comment-text" style="padding: 5px 6px 5px 7px; border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: rgb(221, 221, 221); ...
Show original

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/FEAucvbrinUJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails

Add sphinx.yml file in config folder with added following line. it will
surely work fine

development:
version: '2.0.11'

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

Add sphinx.yml file in cofig folder with added following line. it will
surely work fine

development:
version: '2.0.11'

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

m a newbie in rails. working on Windows 7, 64 bits. Installed my environment through RailsInstaller. latest version ofcourse. When creating a new project, (keeping the gem file as default) and having the bundle install run, am getting the error

gem::package::FormatError: no metadata found in   D:/RailsInstaller/Ruby1.9.3/bin/cashe/activereocrd-3.2.9.gem  and error occurrend while installing activerecord (3.2.9), and bubndler cannot continue.  Make sure that gem install activerecord -v '3.2.9' succeeds before building.  

I tried to run the gem install activerecord..as instructed still bundle install does not work and i cannot run the rails server. (rails s)

When changing the rails version in the app gem file to 3.2.8 instead of 3.2.9 everything seems to work and the rails server runs succefully. What is wrong?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/67bX1J2WLeYJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails

I have a Rails app with following schema:

User (id, username, user_type, master_id) Item ( id,itemname,master_id) Repairs (id, in_date, out_date, user_id, item_id)

The app is small so I have tried keeping db as simple as possible. A user can be Admin, Dealer or Manager. A manager can have many dealers under him(Both stored in same user table).

An Item can be a 'master item' like a computer(with many sub items like keyboard,mouse) or it can be just a small sub item. So a master item can have many sub items under it.

A repair is Repair history for item. A repair has an item and user associated with it.

I have a search for with following parameters ( ALl optional)

  • Manager Name
  • Dealer Name
  • Master Item
  • Sub Item
  • In date
  • Out date

If no 'Dealer Name' is specified I want results to have all Dealers under the specified 'manager name' included in results, if no 'Sub Item' is specified I want all items under 'Master Item' to be in the results.

How should the search controller be defined so as to keep code simple and maintainable? I dont really want to do an 'if' for each condition.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/QkZv7_s2VX4J.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails

that is straight forward: just copy the form_authenticity_token to a header field and let your app send it back as header

https://github.com/mkristian/ixtlan-translations/blob/master/app/controllers/local_controller.rb

that is the controller I use as base for my controllers talking to rest-clients (GWT applications)

- Kristian

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/PAz1kFJmPz4J.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails Friday, December 28, 2012

Hey Jim, don't be a jerk, especially when your answer is wrong.

Using <%= form_authenticity_token %> doesn't work because you don't have
a server to dynamically insert content into html as an app is static and
packaged on the client device (iPhone/iPad).

CSRF should not be a possible attack inside of an app. Your session is
isolated to the app and cross domain origin policies in the browser will
prevent the attack. Also, since you are using an app you can implement
sessions without the use of cookies entirely.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

Ok, I got with this code..

<%= collection_select(:question , :text, Question.all , :id, :text, 
{:prompt => 'Select Question...'}, {:class=>'input', :name=>'normalSelect'}) %>


On Saturday, December 29, 2012 10:15:33 AM UTC+6:30, D2M wrote:
Dear All.

I use this code for my project,

<%= collection_select(:zone_id , :name, @zones, :id, :name,{},{:name=>'normalSelect'}) %>

with this. ruby on rails define default name and id.
Can i change default name to my custom name.

Regards,

D2M

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/T24iIbWQqIsJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails

Dear All.

I use this code for my project,

<%= collection_select(:zone_id , :name, @zones, :id, :name,{},{:name=>'normalSelect'}) %>

with this. ruby on rails define default name and id.
Can i change default name to my custom name.

Regards,

D2M

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/1PfEwf5A3UkJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ruby on Rails

The compiler that comes with Xcode doesn't work with ruby. 

You need to install the version of gcc that works with it and set up a symlink. 

I'm on a plane so I don't have the details with me. Google a bit and you should find blog entries with details. 

On Dec 28, 2012, at 1:30 PM, Adam Zerner <azerner3@gmail.com> wrote:

I'm working on Michael Hartl's ruby on rails tutorial http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec-development_tools.

I installed Git, updated my OS to 10.8.2 and downloaded XCode 4.5.2.

when I type in

rvm install 1.9.3  

this long thing comes up...

Ruby (and needed base gems) for your selection will be installed shortly.  Before it happens, please read and execute the instructions below.  Please use a separate terminal to execute any additional commands.      Notes for Mac OS X 10.8.2, Xcode 4.5.2.    For JRuby:  Install the JDK. See http://developer.apple.com/java/download/  # Current Java version "1.6.0_26"  For IronRuby: Install Mono >= 2.6  For Ruby 1.9.3: Install libksba # If using Homebrew, 'brew install libksba'  For Opal: Install Nodejs with NPM. See http://nodejs.org/download/    To use an RVM installed Ruby as default, instead of the system ruby:        rvm install 1.8.7 # installs patch 357: closest supported version      rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system.gems # migrate your gems      rvm alias create default 1.8.7    And reopen your terminal windows.    Xcode and gcc:    Right now Ruby requires gcc to compile, but Xcode 4.2 and later no longer ship with gcc. Instead they ship with llvm-gcc (to which gcc is a symlink) and clang, neither of which are supported for building Ruby. Xcode 4.1 was the last version to ship gcc, which was /usr/bin/gcc-4.2.    Xcode 4.1 and earlier:  - Ruby will build fine.    Xcode 4.2 and later (including Command Line Tools for Xcode):  - If you have gcc-4.2 (and friends) from an earlier Xcode version, Ruby will build fine.  - If you don't have gcc-4.2, you have two options to get it:   * Install apple-gcc42 from Homebrew   * Install osx-gcc-installer      Homebrew:      If you are using Homebrew, you can install the apple-gcc42 and required libraries from homebrew/dupes:          brew update        brew tap homebrew/dupes        brew install autoconf automake apple-gcc42        rvm pkg install openssl      Xcode 4.2+ install or/and Command Line Tools for Xcode is required to provide make and other tools.      osx-gcc-installer:      If you don't use Homebrew, you can download and install osx-gcc-installer: https://github.com/kennethreitz/osx-gcc-installer.      Warning: Installing osx-gcc-installer on top of a recent Xcode is known to cause problems, so you must uninstall Xcode before installing osx-gcc-installer. Afterwards you may install Xcode 4.2+ or Command Line Tools for Xcode if you desire.      ** NOTE: Currently, Node.js is having issues building with osx-gcc-installer. The only fix is to install Xcode over osx-gcc-installer.    Press 'q' to continue.  ~  (END)   

Originally I had to get homebrew and

brew install libksba  

but I did that already and it works. That leads to "Xcode and gcc:" and everything below it.

So, I have homebrew, and the following three commands work:

  brew update    brew tap homebrew/dupes    brew install autoconf automake apple-gcc42  

But when I try

rvm pkg install openssl  

this is what happens

Fetching openssl-1.0.1c.tar.gz to /Users/adamzerner/.rvm/archives  Extracting openssl to /Users/adamzerner/.rvm/src/openssl-1.0.1c  Configuring openssl in /Users/adamzerner/.rvm/src/openssl-1.0.1c.  Compiling openssl in /Users/adamzerner/.rvm/src/openssl-1.0.1c.  Error running 'make', please read /Users/adamzerner/.rvm/log/openssl/make.log    Please note that it's required to reinstall all rubies:        rvm reinstall all --force    Updating openssl certificates  Error running 'update_openssl_certs', please read /Users/adamzerner/.rvm/log/openssl.certs.log  

And this is what happens when I try what it says...

Adam-Zerners-MacBook-Pro:~ adamzerner$ rvm reinstall all --force  Adam-Zerners-MacBook-Pro:~ adamzerner$   

some other information...

I don't see a .rvm folder under adamzerner, so I can't read what it tells me to (not that I would understand what I'd be reading anyway).

It seems that I have 1.8.7 installed:

Adam-Zerners-MacBook-Pro:~ adamzerner$ ruby -v  ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]  

So... to summarize... when I try to run

rvm install 1.9.3  

I get the gcc/Xcode problem. To fix that it says to download apple-gcc42 from Homebrew. When I do that, I get a problem after doing

rvm pkg install openssl  

The problem being that I need to reinstall all rubies. When I do that:

rvm reinstall all --force  

it seems that nothing happens.

Thanks in advance to anyone willing to help me with this problem!

EDIT: I forgot to say this before. For the "long thing" up above, when I press q to continue, this is what happens...

Searching for binary rubies, this might take some time.  https://rvm.io/binaries/osx/10.8/x86_64/ruby-1.9.3-p327.tar.bz2 - #configure  ruby-1.9.3-p327 - #download  ruby-1.9.3-p327 - #extract  ruby-1.9.3-p327 - #validate  Libraries missing for ruby-1.9.3-p327: env. Refer to your system manual for installing libraries  Mounting remote ruby failed, trying to compile.  Fetching yaml-0.1.4.tar.gz to /Users/adamzerner/.rvm/archives  Extracting yaml to /Users/adamzerner/.rvm/src/yaml-0.1.4  Configuring yaml in /Users/adamzerner/.rvm/src/yaml-0.1.4.  Error running './configure --prefix=/Users/adamzerner/.rvm/usr', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/yaml/configure.log  Compiling yaml in /Users/adamzerner/.rvm/src/yaml-0.1.4.  Error running 'make', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/yaml/make.log  Installing Ruby from source to: /Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327, this may take a while depending on your cpu(s)...  ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while depending on your connection...  ruby-1.9.3-p327 - #extracted to /Users/adamzerner/.rvm/src/ruby-1.9.3-p327 (already extracted)  ruby-1.9.3-p327 - #configuring  Error running './configure --enable-shared --disable-install-doc --prefix=/Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327 --with-opt-dir=/Users/adamzerner/.rvm/usr', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/configure.log  There has been an error while running configure. Halting the installation.  

what happens when you sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc and re run the ruby install? – Oliver Atkinson Dec 25 at 10:35
Does the solution is this StackOverflow thread work for you? – Paul Fioravanti Dec 25 at 11:35
@OliverAtkinson is that all in one line? and should i type "usr" or "adamzerner"? – Adam Zerner Dec 25 at 17:36 
@Paul Floravanti I'm not sure. I don't understand what's going on there enough, and I'm following a somewhat rigid rails tutorial and I'm not sure if doing something it says there will negate/interfere with anything I've done or will be doing in the tutorial. – Adam Zerner Dec 25 at 17:40 
1 
@AdamZerner copy and paste exactly what I put - and yes its /usr/ – Oliver Atkinson 2 days ago
@OliverAtkinson when I copy and paste what you put and then re run the ruby install, the same "long thing" comes up – Adam Zerner 2 days ago 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/52QM0KT6qFsJ.
For more options, visit https://groups.google.com/groups/opt_out.