Ruby on Rails Tuesday, December 31, 2013

Hi,

I'm trying to build an exhaustive list of Rails concepts that one would learn over a period of time, to become a Rails 'ninja' .
The list is on Github 
I'm trying to pair concepts with experience level ( a rough estimate of what concept you should know at what experience level )
This should help as a learning ladder for a Rails developer, at any stage, to move on to the next stage.

Would appreciate help in growing and maintaining this list.
Thanks.



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4feda15a-d22d-4df9-9ea3-9ef76969ffbc%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

On Dec 30, 2013, at 5:26 PM, Marc Munro wrote:

> How can I separate the database DBA user and app access user in rails? The app user will be able to run the app but perform no DDL. The DBA user will be used for migrations.

In your database.yml file, specify the DBA credentials in the development environment, and the "normal user" credentials in the production environment. Either don't run migrations on the production server, and use a different technique to update the schema there once you have settled on your DB structure, or change the password in the yml file to the DBA for installation/upgrades, and return it to "normal" once you have things working in production.

Walter

>
> I do not want the user that runs the rails app to be able to create, drop or modify database objects. This type of user access-rights separation is a pretty minimal best practice and I am concerned that this does not seem to be the norm in the rails world. What am I missing?
>
> My current thinking is that I should create 2 stanzas per database in the database.yml file. One for the dba user and one for the normal app user. Does anyone have any better suggestions?
>
> __
> Marc
>
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/add2b834-6dd6-4cfd-b99f-a8eeab5bdcd2%40googlegroups.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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6A40891C-CB5C-49A4-BA29-B9AAD298DA7B%40wdstudio.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails



On Monday, December 30, 2013 5:26:45 PM UTC-5, Marc Munro wrote:
How can I separate the database DBA user and app access user in rails?  The app user will be able to run the app but perform no DDL.  The DBA user will be used for migrations.

I do not want the user that runs the rails app to be able to create, drop or modify database objects.  This type of user access-rights separation is a pretty minimal best practice and I am concerned that this does not seem to be the norm in the rails world.  What am I missing?

My current thinking is that I should create 2 stanzas per database in the database.yml file.  One for the dba user and one for the normal app user.  Does anyone have any better suggestions?

__
Marc

You need to be a little more specific re what you mean by 'database objects'. 

When talking about db/migrate type activities, you are concerned with creating, modifying, and dropping tables.  These actions are usually (except for sqlite) controlled by permissions associated with a database role.  If the db role (username in the database.yml file) has create or alter privileges associated with it that user will be able to run migrations.  That said, migrations are not typically (or should they be) run from within a rails app.

When talking about db record level activities, which correspond to ActiveRecord model CRUD actions, you are again faced with the need to modify an existing table.  These changes, made in the context of a running rails app, are typically limited to table content (rather than form).  The db role (username in the database.yml) must be able to modify the database tables.

You get finer grained control within the rails app by using an authorization scheme (declarative_authorization and cancan gems) together with model associations (user has profile, profile belongs to user) to control access to data.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/cf2be7c1-d673-42a5-b3b6-34877b5eaf03%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails Monday, December 30, 2013

I have put together a blog post on exactly the same topic: http://bit.ly/1hbbBqj

hope it helps.


On Thursday, December 26, 2013 6:43:20 AM UTC+8, Dan Boyle wrote:
I have spent hours trying to get some version of Rails installed and all to no avail. It seems there are many people who get the same errors but nobody seems to have any answers. 

I am new to both Rails and Ubuntu.  This is where I am trying to set it up. 

Most recently I went to rubyonrails.org and it suggests to use Rails 4.0 and Ruby 2.1 and to use rbenv to install rather than RVM. 

It says it installed it but then it doesn't work. 

When I type: ruby -v

I get...

rbenv: ruby: command not found

The `ruby' command exists in these Ruby versions:
  2.1.0

What is this telling me?  It says it isn't found and that it does exist.  Huh? 

Why is this so difficult?  Any insights to help me get my head around all of this would be most welcomed.

Dan

 


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9c0328c2-493d-4d54-b7f7-d811ade1c43b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

On Monday, December 30, 2013 9:11:16 PM UTC, Ruby-Forum.com User wrote:

>
> >
>
> > You need to add the attributes that are allowed for user_profile.
>
>
>
>
> in fact i want to add all attributes of user_profile. for testing
>
> purpose I added firstname & lastname like this
>
> def user_params
>
> params.require(:user).permit(:email, :password,
>
> :user_profile_attributes => [:firstname, :lastname])
>
> end
>
>
>
> but still not working.
>
> user_profile is in unpermitted parameter.
>
>

There shouldn't really be any parameters of that name. It's not clear what changes you made after I suggested accepts_nested_attributes. In particular how you call fields_for in the view is very relevant.

Fred

>
> Unpermitted parameters: password_confirmation, user_profile
>
>
>
> 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/480e6d42-5fa8-44c7-b778-14c44419ff16%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

How can I separate the database DBA user and app access user in rails?  The app user will be able to run the app but perform no DDL.  The DBA user will be used for migrations.

I do not want the user that runs the rails app to be able to create, drop or modify database objects.  This type of user access-rights separation is a pretty minimal best practice and I am concerned that this does not seem to be the norm in the rails world.  What am I missing?

My current thinking is that I should create 2 stanzas per database in the database.yml file.  One for the dba user and one for the normal app user.  Does anyone have any better suggestions?

__
Marc

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/add2b834-6dd6-4cfd-b99f-a8eeab5bdcd2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

Frederick Cheung wrote in post #1131871:
> On Monday, December 30, 2013 5:12:27 PM UTC, Ruby-Forum.com User wrote:
>> Colin Law wrote in post #1131851:
>
>> > inserting puts statements into your code, so if you insert
>>
>> def user_params
>>
>> params.require(:user).permit(:email, :password,
>>
>> :user_profile_attributes =>[])
>>
>> end
>>
>
> You need to add the attributes that are allowed for user_profile.
>
> Fred

in fact i want to add all attributes of user_profile. for testing
purpose I added firstname & lastname like this
def user_params
params.require(:user).permit(:email, :password,
:user_profile_attributes => [:firstname, :lastname])
end

but still not working.
user_profile is in unpermitted parameter.

Unpermitted parameters: password_confirmation, user_profile

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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9929063167b384aa868668b234b4d099%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

On Monday, December 30, 2013 5:12:27 PM UTC, Ruby-Forum.com User wrote:
> Colin Law wrote in post #1131851:

> >> @user = User.new(user_params)
>
> >> @user_profile = @user.build_user_profile(params[:user_profile])
>
> >
>
> > Have a look in log/development.log and you will see the parameters you
>
> > are posting and check they are ok. Also you can do thinks like
>
> > inserting puts statements into your code, so if you insert
>
> I found the reason but I can not solve it.
>
> user_profile is unpermitted parameter.
>
>
>
> I added
>
>
>
> def user_params
>
> params.require(:user).permit(:email, :password,
>
> :user_profile_attributes =>[])
>
> end
>

You need to add the attributes that are allowed for user_profile.

Fred

> in the conroller and
>
>
>
> accepts_nested_attributes_for :user_profile
>
>
>
> in the model.
>
>
>
> still the same problem.
>
>
>
> 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/18c62cc8-dbeb-4d8b-80d0-aa5a69da3248%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

Colin Law wrote in post #1131851:
> On 30 December 2013 12:36, Ravi Vendan <lists@ruby-forum.com> wrote:
>>>>
>> I had tried. This works, but while saving user_profile field values are
>> nil except ids.
>> my create method like this
>>
>> @user = User.new(user_params)
>> @user_profile = @user.build_user_profile(params[:user_profile])
>
> Have a look in log/development.log and you will see the parameters you
> are posting and check they are ok. Also you can do thinks like
> inserting puts statements into your code, so if you insert
>
> puts inspect params[:user_profile]
>
> in the code above it will print the params in the server terminal
> window so you can check they are ok.
>
> Colin

I found the reason but I can not solve it.
user_profile is unpermitted parameter.

I added

def user_params
params.require(:user).permit(:email, :password,
:user_profile_attributes =>[])
end
in the conroller and

accepts_nested_attributes_for :user_profile

in the model.

still the same problem.

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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ff76b2ec4725a91706c01b5e05b90ea0%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

On 30 December 2013 15:06, João Paulo <lists@ruby-forum.com> wrote:
> Sorry Colin, I'll try to explain in a better way. In my system I have a
> variable called 'movie' and this 'movie' have a boolean attribute
> 'rented' that describes if this 'movie' was rented or not. I've created
> a scaffold to this variable and int this scaffold I put a new link to
> modify this attribute in this way:

Please remember to quote the previous message and insert your reply at
appropriate points.

> ...
> <td><%= link_to 'Rent', action: :rent, :id => movie.id %></td>
> # the link that I told
> ...

> ------------------------------------------> routes.rb
>
>
> Locadora::Application.routes.draw do
> resources :movies
>
> # The priority is based upon order of creation: first created ->
> highest priority.
> # See how all your routes lay out with "rake routes".
>
> # You can have the root of your site routed with "root"
> # root 'welcome#index'
>
> # Example of regular route:
> # get 'products/:id' => 'catalog#view'
>
> # Example of named route that can be invoked with purchase_url(id:
> product.id)
> # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
>
> # Example resource route (maps HTTP verbs to controller actions
> automatically):
> # resources :products
>
> # Example resource route with options:
> # resources :products do
> # member do
> # get 'short'
> # post 'toggle'
> # end
> #
> # collection do
> # get 'sold'
> # end
> # end
>
> # Example resource route with sub-resources:
> # resources :products do
> # resources :comments, :sales
> # resource :seller
> # end
>
> # Example resource route with more complex sub-resources:
> # resources :products do
> # resources :comments
> # resources :sales do
> # get 'recent', on: :collection
> # end
> # end
>
> # Example resource route with concerns:
> # concern :toggleable do
> # post 'toggle'
> # end
> # resources :posts, concerns: :toggleable
> # resources :photos, concerns: :toggleable
>
> # Example resource route within a namespace:
> # namespace :admin do
> # # Directs /admin/products/* to Admin::ProductsController
> # # (app/controllers/admin/products_controller.rb)
> # resources :products
> # end
> end
>
> ------------------------------------------> error in browser
>
> No route matches {:action=>"rent", :id=>1, :controller=>"movies"}

You have asked for action rent on the movies controller but you have
not provided a route for that.

I suggest you work right through a good tutorial such as
railstutorial.org (which is free to use online) which will show you
the basics of rails.

If you have a look at the Rails Guide on Routing then it will show you
how to do it, but best to work through the tutorial first.

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsbuTfyoJP9JQArVkyZpbbWTdTsOoj1g%3DtWXoHwbdePAA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

Sorry Colin, I'll try to explain in a better way. In my system I have a
variable called 'movie' and this 'movie' have a boolean attribute
'rented' that describes if this 'movie' was rented or not. I've created
a scaffold to this variable and int this scaffold I put a new link to
modify this attribute in this way:

------------------------------------------> index.html.erb (view of the
listing)


<h1>Listing movies</h1>

<table>
<thead>
<tr>
<th>Cover</th>
<th>Name</th>
<th>Description</th>
<th>Rented</th>
<th>Genre</th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>

<tbody>
<% @movies.each do |movie| %>
<tr>
<td><img src="<%= movie.cover %>" width="95"/></td>
<td><%= movie.name %></td>
<td><%= movie.description %></td>
<td><%= movie.rented %></td>
<td><%= movie.genre %></td>
<td><%= link_to 'Rent', action: :rent, :id => movie.id %></td>
# the link that I told
<td><%= link_to 'Show', movie %></td>
<td><%= link_to 'Edit', edit_movie_path(movie) %></td>
<td><%= link_to 'Destroy', movie, method: :delete, data: {
confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>

<br>

<%= link_to 'New Movie', new_movie_path %>

------------------------------------------> movies_controller.rb

class MoviesController < ApplicationController
before_action :set_movie, only: [:show, :edit, :update, :destroy,
:rent]

def index
@movies = Movie.all
end

def show
end

def new
@movie = Movie.new
end

def edit
end

def create
@movie = Movie.new(movie_params)

respond_to do |format|
if @movie.save
format.html { redirect_to @movie, notice: 'Movie was
successfully created.' }
format.json { render action: 'show', status: :created, location:
@movie }
else
format.html { render action: 'new' }
format.json { render json: @movie.errors, status:
:unprocessable_entity }
end
end
end

def update
respond_to do |format|
if @movie.update(movie_params)
format.html { redirect_to @movie, notice: 'Movie was
successfully updated.' }
format.json { head :no_content }
else
format.html { render action: 'edit' }
format.json { render json: @movie.errors, status:
:unprocessable_entity }
end
end
end

def destroy
@movie.destroy
respond_to do |format|
format.html { redirect_to movies_url }
format.json { head :no_content }
end
end

def rent
@movie.to_rent
end

private
def set_movie
@movie = Movie.find(params[:id])
end

def movie_params
params.require(:movie).permit(:name, :description, :cover,
:rented, :genre)
end
end

------------------------------------------> movie.rb


class Movie < ActiveRecord::Base
def to_rent
self.rented = true
end
end

------------------------------------------> routes.rb


Locadora::Application.routes.draw do
resources :movies

# The priority is based upon order of creation: first created ->
highest priority.
# See how all your routes lay out with "rake routes".

# You can have the root of your site routed with "root"
# root 'welcome#index'

# Example of regular route:
# get 'products/:id' => 'catalog#view'

# Example of named route that can be invoked with purchase_url(id:
product.id)
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase

# Example resource route (maps HTTP verbs to controller actions
automatically):
# resources :products

# Example resource route with options:
# resources :products do
# member do
# get 'short'
# post 'toggle'
# end
#
# collection do
# get 'sold'
# end
# end

# Example resource route with sub-resources:
# resources :products do
# resources :comments, :sales
# resource :seller
# end

# Example resource route with more complex sub-resources:
# resources :products do
# resources :comments
# resources :sales do
# get 'recent', on: :collection
# end
# end

# Example resource route with concerns:
# concern :toggleable do
# post 'toggle'
# end
# resources :posts, concerns: :toggleable
# resources :photos, concerns: :toggleable

# Example resource route within a namespace:
# namespace :admin do
# # Directs /admin/products/* to Admin::ProductsController
# # (app/controllers/admin/products_controller.rb)
# resources :products
# end
end

------------------------------------------> error in browser

No route matches {:action=>"rent", :id=>1, :controller=>"movies"}

--
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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9eb5c007084d1ca7bf1ac411467a4344%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

I have several rails applications that I want to combine into a single application using rails engines.  Many of the models appear in multiple applications (now engines) and have some methods in common.  I want to make this code DRY, removing the code duplication that I now have.  Ideally, I want a single instance of the common methods and still be able to test each engine independently.  Where should I put the common methods?

Some pointers would be appreciated.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c1c511e8-15c5-4299-8b4a-dae18639225f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

On 30 December 2013 12:36, Ravi Vendan <lists@ruby-forum.com> wrote:
> Frederick Cheung wrote in post #1131847:
>> On Monday, December 30, 2013 12:03:57 PM UTC, Ruby-Forum.com User wrote:
>>>
>>> I am new to ruby on rails.
>>> I have 2 models, user and user_profile.
>>> user has_one user_profile.
>>> User_profile belongs_to user.
>>> when creating user I want to create user_profile, in one form get user
>>> and user_profile and save both.How ca I do that.
>>> Thanks for your help.
>>>
>>
>> One approach is to use accepts_nested_attributes -
>> see
>> http://guides.rubyonrails.org/v3.2.14/2_3_release_notes.html#nested-object-forms
>> for example.
>>
>> Fred
>
> Thanks Fred,
>
> I had tried. This works, but while saving user_profile field values are
> nil except ids.
> my create method like this
>
> @user = User.new(user_params)
> @user_profile = @user.build_user_profile(params[:user_profile])

Have a look in log/development.log and you will see the parameters you
are posting and check they are ok. Also you can do thinks like
inserting puts statements into your code, so if you insert

puts inspect params[:user_profile]

in the code above it will print the params in the server terminal
window so you can check they are ok.

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLtRUn%2BcTbsJK12T%3DHEjn4ba7NBXU9G6%2B8Hio9XWRP4fHg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

Frederick Cheung wrote in post #1131847:
> On Monday, December 30, 2013 12:03:57 PM UTC, Ruby-Forum.com User wrote:
>>
>> I am new to ruby on rails.
>> I have 2 models, user and user_profile.
>> user has_one user_profile.
>> User_profile belongs_to user.
>> when creating user I want to create user_profile, in one form get user
>> and user_profile and save both.How ca I do that.
>> Thanks for your help.
>>
>
> One approach is to use accepts_nested_attributes -
> see
> http://guides.rubyonrails.org/v3.2.14/2_3_release_notes.html#nested-object-forms
> for example.
>
> Fred

Thanks Fred,

I had tried. This works, but while saving user_profile field values are
nil except ids.
my create method like this

@user = User.new(user_params)
@user_profile = @user.build_user_profile(params[:user_profile])

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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/34723ac91ab44ac4c48d0556c920df13%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails



On Monday, December 30, 2013 12:03:57 PM UTC, Ruby-Forum.com User wrote:
I am new to ruby on rails.
I have 2 models, user and user_profile.
user has_one user_profile.
User_profile belongs_to user.
when creating user I want to create user_profile, in one form get user
and user_profile and save both.How ca I do that.
Thanks for your help.

One approach is to use accepts_nested_attributes  - see http://guides.rubyonrails.org/v3.2.14/2_3_release_notes.html#nested-object-forms for example.

Fred

--
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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e57e29ca-512a-43b2-a4c1-c140fbd22a4e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

I am new to ruby on rails.
I have 2 models, user and user_profile.
user has_one user_profile.
User_profile belongs_to user.
when creating user I want to create user_profile, in one form get user
and user_profile and save both.How ca I do that.
Thanks for your help.

--
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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/45a268b84b254a685bdfe8ad8830d7a6%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

On 30 December 2013 02:55, Joshua Kleckner <steinmetzelectronics@gmail.com> wrote:
Hello.  Brand new to Rails.  Following along on the Getting Started guide, stuck on section 4.2 where upon entering:

$ rails generate controller welcome index

I receive:

 Could not find generator controller

Which version of rails are you using?
rails -v
 
Also which operating system are you using and how did you install ruby/rails?

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLtuCa0yT3PcYQGDC0Fzex7zLmsz%3DwxFoX3M95wye2%3Drow%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

On 30 December 2013 00:39, João Paulo <lists@ruby-forum.com> wrote:
> I'm programming a web system for a rental of movies and put the resource
> for rent a movie, but the routes don't maches and the rails gives me
> that message of error. My code and the error gived by rails are in
> pictures. Thank you for the attention and for the help.

It is better to copy/paste information rather than linking to images.
That way we can insert comments inline in the text. Only post
information that is relevant to the problem of course.

Even more significantly you have not posted the contents of routes.rb
or shown us the output from
rake routes

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLtZ8Gxi3-YZporv1LJBzDE5ijUgX0ohQ9FMnGYP2PwYGg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails Sunday, December 29, 2013

Hello.  Brand new to Rails.  Following along on the Getting Started guide, stuck on section 4.2 where upon entering:

$ rails generate controller welcome index

I receive:

 Could not find generator controller

Everything seemed fine until this point.  Any help is appreciated. 
 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/45c00b7f-2bf6-452d-a9b8-d47e82210667%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

I'm programming a web system for a rental of movies and put the resource
for rent a movie, but the routes don't maches and the rails gives me
that message of error. My code and the error gived by rails are in
pictures. Thank you for the attention and for the help.

Attachments:
http://www.ruby-forum.com/attachment/9100/rails-error-0.png
http://www.ruby-forum.com/attachment/9101/rails-error-1.png
http://www.ruby-forum.com/attachment/9102/rails-error-2.png
http://www.ruby-forum.com/attachment/9103/rails-error-3.png


--
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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a86ae7f81a6690392b4fc304b9449f76%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

Hi there,

On the site

http://www.deutsche-startups.de/2013/07/25/12-schicke-wordcloud-generatoren-um-text-visuell-zu-gestalten/

there are several ways for good looking word clouds.

Are there any gems or algorithms for ruby on rails available for generating word clouds?

Thanks,
Martin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/fd09590f-3597-4fb1-8438-fb05338f2532%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails Saturday, December 28, 2013

I use a script called RailsReady, which sets up a fresh OSX/Ubuntu/CentOS installation with Homebrew, RVM, Ruby, all supporting libraries, Bundler, Passenger, Rails, Git.


I've used it > 100 times, and it has never given me a problem.

-- 
Dheeraj Kumar

On Sunday, 29 December 2013 at 11:14 am, Scott Eisenberg wrote:

More:  followed http://gorails.com/setup/ubuntu/13.10 (using the choice of rvm)

Worked like charm.  As they say, do that!

Note:  Don't install apt-get ruby or apt-get rails as they will get you older versions.  The rails version is 2.3 which is REALLY old.  Follow the guide.

Then make an app.  Do: rails new test1

It will create an app and then run bundle install.  This came back with an error telling me I had to install a certain gem.  Do what it says and install it (it gives the command line) and then bundle install again.  Had to do this about 3 times.

Finally when you get a clean bundle, run: rails s to start a server.  Point the browser to http://0.0.0.0:3000 and see it's working



And as you can see from my previous post's timestamp, this only took about 40 minutes to go from nothing to (i) completely new install of Ubuntu to (ii) ruby/rails installed with (iii) a basic app



On Dec 29, 2013, at 12:06 AM, Scott Eisenberg <scott2@btrtrucks.com> wrote:

Let me re-phrase that, Parallels is downloading 13.04 desktop so let's work with that version, shall we?

On Dec 29, 2013, at 12:02 AM, Scott Eisenberg <scott2@btrtrucks.com> wrote:

I'm on Macs and I found it pretty easy to set up.  I remember in the beginning some version hell with the various Gems but that seems to have settled down for me.

Maybe I can install a Ubuntu on Parallels on the Mac and see if we can guide you through this (assuming I can get it to work on Ubuntu).

What version of Ubuntu are you working with?


On Dec 25, 2013, at 5:43 PM, Dan Boyle <dan.boyle.dc@gmail.com> wrote:

I have spent hours trying to get some version of Rails installed and all to no avail. It seems there are many people who get the same errors but nobody seems to have any answers. 

I am new to both Rails and Ubuntu.  This is where I am trying to set it up. 

Most recently I went to rubyonrails.org and it suggests to use Rails 4.0 and Ruby 2.1 and to use rbenv to install rather than RVM. 

It says it installed it but then it doesn't work. 

When I type: ruby -v

I get...

rbenv: ruby: command not found

The `ruby' command exists in these Ruby versions:
  2.1.0

What is this telling me?  It says it isn't found and that it does exist.  Huh? 

Why is this so difficult?  Any insights to help me get my head around all of this would be most welcomed.

Dan

 



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6b6b5791-b887-4ed5-a9a8-dc732e3f2d97%40googlegroups.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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1D12B7F3-BF9C-437E-B919-12DE58BF015D%40btrtrucks.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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/FD8ECECB-0135-40D8-97E1-8E7A842DB929%40btrtrucks.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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6C8061DD-1CF2-4018-83B4-2E06736E4707%40btrtrucks.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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/F4BA6EF0103E42B197B052B11B3D9023%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

More:  followed http://gorails.com/setup/ubuntu/13.10 (using the choice of rvm)


Worked like charm.  As they say, do that!

Note:  Don't install apt-get ruby or apt-get rails as they will get you older versions.  The rails version is 2.3 which is REALLY old.  Follow the guide.

Then make an app.  Do: rails new test1

It will create an app and then run bundle install.  This came back with an error telling me I had to install a certain gem.  Do what it says and install it (it gives the command line) and then bundle install again.  Had to do this about 3 times.

Finally when you get a clean bundle, run: rails s to start a server.  Point the browser to http://0.0.0.0:3000 and see it's working



And as you can see from my previous post's timestamp, this only took about 40 minutes to go from nothing to (i) completely new install of Ubuntu to (ii) ruby/rails installed with (iii) a basic app



On Dec 29, 2013, at 12:06 AM, Scott Eisenberg <scott2@btrtrucks.com> wrote:

Let me re-phrase that, Parallels is downloading 13.04 desktop so let's work with that version, shall we?

On Dec 29, 2013, at 12:02 AM, Scott Eisenberg <scott2@btrtrucks.com> wrote:

I'm on Macs and I found it pretty easy to set up.  I remember in the beginning some version hell with the various Gems but that seems to have settled down for me.

Maybe I can install a Ubuntu on Parallels on the Mac and see if we can guide you through this (assuming I can get it to work on Ubuntu).

What version of Ubuntu are you working with?


On Dec 25, 2013, at 5:43 PM, Dan Boyle <dan.boyle.dc@gmail.com> wrote:

I have spent hours trying to get some version of Rails installed and all to no avail. It seems there are many people who get the same errors but nobody seems to have any answers. 

I am new to both Rails and Ubuntu.  This is where I am trying to set it up. 

Most recently I went to rubyonrails.org and it suggests to use Rails 4.0 and Ruby 2.1 and to use rbenv to install rather than RVM. 

It says it installed it but then it doesn't work. 

When I type: ruby -v

I get...

rbenv: ruby: command not found

The `ruby' command exists in these Ruby versions:
  2.1.0

What is this telling me?  It says it isn't found and that it does exist.  Huh? 

Why is this so difficult?  Any insights to help me get my head around all of this would be most welcomed.

Dan

 



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6b6b5791-b887-4ed5-a9a8-dc732e3f2d97%40googlegroups.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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1D12B7F3-BF9C-437E-B919-12DE58BF015D%40btrtrucks.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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/FD8ECECB-0135-40D8-97E1-8E7A842DB929%40btrtrucks.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

Let me re-phrase that, Parallels is downloading 13.04 desktop so let's work with that version, shall we?


On Dec 29, 2013, at 12:02 AM, Scott Eisenberg <scott2@btrtrucks.com> wrote:

I'm on Macs and I found it pretty easy to set up.  I remember in the beginning some version hell with the various Gems but that seems to have settled down for me.

Maybe I can install a Ubuntu on Parallels on the Mac and see if we can guide you through this (assuming I can get it to work on Ubuntu).

What version of Ubuntu are you working with?


On Dec 25, 2013, at 5:43 PM, Dan Boyle <dan.boyle.dc@gmail.com> wrote:

I have spent hours trying to get some version of Rails installed and all to no avail. It seems there are many people who get the same errors but nobody seems to have any answers. 

I am new to both Rails and Ubuntu.  This is where I am trying to set it up. 

Most recently I went to rubyonrails.org and it suggests to use Rails 4.0 and Ruby 2.1 and to use rbenv to install rather than RVM. 

It says it installed it but then it doesn't work. 

When I type: ruby -v

I get...

rbenv: ruby: command not found

The `ruby' command exists in these Ruby versions:
  2.1.0

What is this telling me?  It says it isn't found and that it does exist.  Huh? 

Why is this so difficult?  Any insights to help me get my head around all of this would be most welcomed.

Dan

 



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6b6b5791-b887-4ed5-a9a8-dc732e3f2d97%40googlegroups.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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1D12B7F3-BF9C-437E-B919-12DE58BF015D%40btrtrucks.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

I'm on Macs and I found it pretty easy to set up.  I remember in the beginning some version hell with the various Gems but that seems to have settled down for me.


Maybe I can install a Ubuntu on Parallels on the Mac and see if we can guide you through this (assuming I can get it to work on Ubuntu).

What version of Ubuntu are you working with?


On Dec 25, 2013, at 5:43 PM, Dan Boyle <dan.boyle.dc@gmail.com> wrote:

I have spent hours trying to get some version of Rails installed and all to no avail. It seems there are many people who get the same errors but nobody seems to have any answers. 

I am new to both Rails and Ubuntu.  This is where I am trying to set it up. 

Most recently I went to rubyonrails.org and it suggests to use Rails 4.0 and Ruby 2.1 and to use rbenv to install rather than RVM. 

It says it installed it but then it doesn't work. 

When I type: ruby -v

I get...

rbenv: ruby: command not found

The `ruby' command exists in these Ruby versions:
  2.1.0

What is this telling me?  It says it isn't found and that it does exist.  Huh? 

Why is this so difficult?  Any insights to help me get my head around all of this would be most welcomed.

Dan

 



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6b6b5791-b887-4ed5-a9a8-dc732e3f2d97%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails



On Wednesday, December 25, 2013 5:43:20 PM UTC-5, Dan Boyle wrote:
I have spent hours trying to get some version of Rails installed and all to no avail. It seems there are many people who get the same errors but nobody seems to have any answers. 

I am new to both Rails and Ubuntu.  This is where I am trying to set it up. 

Most recently I went to rubyonrails.org and it suggests to use Rails 4.0 and Ruby 2.1 and to use rbenv to install rather than RVM. 

It says it installed it but then it doesn't work. 

When I type: ruby -v

I get...

rbenv: ruby: command not found

The `ruby' command exists in these Ruby versions:
  2.1.0

What is this telling me?  It says it isn't found and that it does exist.  Huh? 

Why is this so difficult?  Any insights to help me get my head around all of this would be most welcomed.

Dan

 


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9a00b2aa-08b2-453d-88c6-6948d9e4c48f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

Hi, 

I have an Excel File which have some formulas in that and working well.

Can anybody knows such plugin/gem which convert this excel file to Rails views with functionality (formulas).

Thanks in Advance :)

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CALSzCDBAmufTLW7Eo50p_didP3FB4UD%2BgyFb4HWo3k3mfOcVuA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

If you're running *NIX you can see which process is listening on port 3000 by running lsof -i :3000

You can also change the port you want your rails server to listen to with the -9 option.

For example : rails server -p 8080 will listen on port 8080.

On Friday, December 27, 2013 6:45:17 AM UTC+1, pavey nganpi wrote:
i have restarted my pc but i still have the same pb, i wasnt able to fins the process which was running,thanks

On Thursday, December 26, 2013 11:41:45 PM UTC-5, pavey nganpi wrote:
rails server                                                                                                       
=> Booting WEBrick                                                                                                 
=> Rails 4.0.2 application starting in development on http://0.0.0.0:3000                                          
=> Run `rails server -h` for more startup options                                                                  
=> Ctrl-C to shutdown server                                                                                       
[2013-12-26 23:29:07] INFO  WEBrick 1.3.1                                                                          
[2013-12-26 23:29:07] INFO  ruby 2.0.0 (2013-11-22) [i386-mingw32]                                                 
[2013-12-26 23:29:07] WARN  TCPServer Error: Only one usage of each socket address (protocol/network address/po    
rt) is normally permitted. - bind(2)                                                                               
Exiting                                                                                                            
C:/Ruby200/lib/ruby/2.0.0/webrick/utils.rb:85:in `initialize': Only one usage of each socket address (protocol/    
network address/port) is normally permitted. - bind(2) (Errno::EADDRINUSE)                                         
        from C:/Ruby200/lib/ruby/2.0.0/webrick/utils.rb:85:in `new'                                                
        from C:/Ruby200/lib/ruby/2.0.0/webrick/utils.rb:85:in `block in create_listeners'                          
        from C:/Ruby200/lib/ruby/2.0.0/webrick/utils.rb:82:in `each'                                               
        from C:/Ruby200/lib/ruby/2.0.0/webrick/utils.rb:82:in `create_listeners'                                   
        from C:/Ruby200/lib/ruby/2.0.0/webrick/server.rb:132:in `listen'                                           
        from C:/Ruby200/lib/ruby/2.0.0/webrick/server.rb:113:in `initialize'                                       
        from C:/Ruby200/lib/ruby/2.0.0/webrick/httpserver.rb:45:in `initialize'                                    
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:11:in `new'                
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:11:in `run'                
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:264:in `start'                      
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.2/lib/rails/commands/server.rb:84:in `start'         
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:76:in `block in <top (req    
uired)>'                                                                                                           
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'                  
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `<top (required)>'     
        from bin/rails:4:in `require'                                                                              
        from bin/rails:4:in `<main>'                                                                               

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/95d5de23-1c28-4975-911a-068ee8923793%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails Friday, December 27, 2013



On Friday, December 27, 2013 11:13:03 AM UTC-5, Hassan Schroeder wrote:
On Fri, Dec 27, 2013 at 7:41 AM, jsnark <s...@monmouth.com> wrote:

> Thanks.  Upgrading to rails 3.2.12 did the trick.

Uh, and you realize that 3.2.13, 3.2.15, and 3.2.16 (latest 3.2.x) all
include critical security fixes, right?  :-)

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Thanks.  I upgraded to 3.2.16.  Actually, I am not very concerned about this because all my applications run on an intranet and are not accessible outside my company.  The users here are not sophisticated enough to exploit any security holes in rails.

I am now going to merge several rails applications into a single one using engines so that they remain separated.  Many of the models appear in multiple applications (now engines) and have some methods in common.  I want to keep my code DRY.  I did not see how to factor out the common methods while going through the tutorial.  Some pointers would be appreciated.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/cb8f914d-a405-4e5e-9b1b-b56c29152760%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails

On Fri, Dec 27, 2013 at 7:41 AM, jsnark <swr@monmouth.com> wrote:

> Thanks. Upgrading to rails 3.2.12 did the trick.

Uh, and you realize that 3.2.13, 3.2.15, and 3.2.16 (latest 3.2.x) all
include critical security fixes, right? :-)

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yCj2voh3y_Pj3Fu0YnYPyHHp%3DqtaR69L_%3DYuJC1xOkOtA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ruby on Rails



On Thursday, December 26, 2013 5:24:43 PM UTC-5, Frederick Cheung wrote:


On Thursday, December 26, 2013 8:41:21 PM UTC, jsnark wrote:
I'm working through the Rails Engines tutorial at http://edgeguides.rubyonrails.org/engines.html.  I'm using ruby 1.9.3 and rails 3.1.12 on Linux.  I'm stuck on section 4.1.  When I try to access localhost:3000/blog I get:

That guide is for the rails development branch (i.e currently it's probably tracking rails 4.1), so it may differ significantly from rails 3.1.12. I don't thing 3.1.x is maintained anymore, however the rails 3.2.x guides are at http://guides.rubyonrails.org/v3.2.14/engines.html and the rails 4.0.x guides are at http://guides.rubyonrails.org.

I would start by picking one of those versions and going along with the corresponding guide

Fred

 
Thanks.  Upgrading to rails 3.2.12 did the trick.  My company is not ready for rails 4 yet.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d4c76076-7992-4ace-ab38-bcf78af833c4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.