On Thursday, 30 October 2014 13:56:51 UTC-4, Markus D. wrote:
Hello,
I just stumbled upon a behaviour about associations I do not really understand why Rails/ActiveRecord cannot get the connection. Using activerecord (4.2.0.beta2).
To describe it, lets work with theses models:
class User < ActiveRecord::Base
has_many :project_participations
has_many :projects, through: :project_participations, inverse_of: :users
end
class ProjectParticipation < ActiveRecord::Base
belongs_to :user
belongs_to :project
enum role: { member: 0, manager: 1 }
end
class Project < ActiveRecord::Base
has_many :project_participations
has_many :users, through: :project_participations, inverse_of: :projects
end
A user can participate in many projects with a role as a member or a manager. The connecting model is called ProjectParticipation.
I now have a problem using the associations on unsaved objects. The following commands work like I think they should work:
# first example
u = User.new
p = Project.new
u.projects << p
u.projects
=> #<ActiveRecord::Associations::CollectionProxy [#<Project id: nil>]>
u.project_participations
=> #<ActiveRecord::Associations::CollectionProxy [#<ProjectParticipation id: nil, user_id: nil, project_id: nil, role: nil>]>
So far so good - AR created the ProjectParticipation by itself and I can access the projects of a user with u.projects.
But it does not work if I create the ProjectParticipation by myself:
Why are the projects empty? I cannot access the projects by u.projects like before, even the ProjectParticipation is there.
# second example
u = User.new
pp = ProjectParticipation.new
p = Project.new
pp.project = p # assign project to project_participation
u.project_participations << pp # assign project_participation to user
u.project_participations
=> #<ActiveRecord::Associations::CollectionProxy [#<ProjectParticipation id: nil, user_id: nil, project_id: nil, role: nil>]>
u.projects
=> #<ActiveRecord::Associations::CollectionProxy []>
But if I go through the participations directly, the project shows up:
u.project_participations.map(&: project)
=> [#<Project id: nil>]
Shouldn't it work like the first example directly:
u.projects returning me all projects not depending on whether I create the join object by myself or not? Or how can I make AR aware of this?
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/301e3be4-1ede-43c5-8396-ac374bcd3344%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Thursday, 30 October 2014 14:19:46 UTC-4, Robert Fitzpatrick wrote:
Colin Law wrote:
> That tells you it is rails 4.0.0 as activemodel is one of the
> components. However, rather than seeing what versions are installed
> (there could be more than one version of the gems installed) look in
> the file Gemfile.lock in the applications root folder and you will see
> what versions it /requires/.
I have several GIT entries in the Gemfile.lock file and a list of gems
after the following lines, but this list looks much more extensive than
'gem list' shows ...
GEM
remote: https://rubygems.org/
specs:
<list of gems>
Then under DEPENDENCIES, I see ...
rails (= 3.2.13)
Does that explain my rails version? I don't see any references to 4.0.0.
> 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. A few days spend doing that will save you time
> in the long run.
Yes, I've already found that and been reading, thanks.
> If you want this for development work then I suggest you install rails
> using rvm [1]
> That will give you a complete working setup in a few minutes.
I used rvm to install same ruby-1.9.3-p392 as the VPS, following a doc
here...
https://www.digitalocean.com/community/tutorials/how-to- install-rails-apache-and- mysql-on-ubuntu-with-passenger
After all setup in Apache, I am getting this Passenger application error
in the browser....
cannot load such file -- bundler/setup (LoadError)
/usr/share/ruby-rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9. 1/rubygems/custom_require.rb: 36:in
`require'
/usr/share/ruby-rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9. 1/rubygems/custom_require.rb: 36:in
`require'
/usr/share/ruby-rvm/gems/ruby-1.9.3-p392/gems/passenger-4.0. 53/lib/phusion_passenger/ loader_shared_helpers.rb:263: in
`block in run_load_path_setup_code'
/usr/share/ruby-rvm/gems/ruby-1.9.3-p392/gems/passenger-4.0. 53/lib/phusion_passenger/ loader_shared_helpers.rb:366: in
`running_bundler'
/usr/share/ruby-rvm/gems/ruby-1.9.3-p392/gems/passenger-4.0. 53/lib/phusion_passenger/ loader_shared_helpers.rb:261: in
`run_load_path_setup_code'
/usr/share/ruby-rvm/gems/ruby-1.9.3-p392/gems/passenger-4.0. 53/helper-scripts/rack- preloader.rb:100:in
`preload_app'
/usr/share/ruby-rvm/gems/ruby-1.9.3-p392/gems/passenger-4.0. 53/helper-scripts/rack- preloader.rb:158:in
`<module:App>'
/usr/share/ruby-rvm/gems/ruby-1.9.3-p392/gems/passenger-4.0. 53/helper-scripts/rack- preloader.rb:29:in
`<module:PhusionPassenger>'
/usr/share/ruby-rvm/gems/ruby-1.9.3-p392/gems/passenger-4.0. 53/helper-scripts/rack- preloader.rb:28:in
`<main>'
Perhaps I need to get some more gems installed? I did a 'gem install
bundle' and still get the error. My gem list is this so far on the dev
server I am trying to setup, not sure if this error is affecting things
as well...
root@media:/etc/apache2# gem list
/usr/share/ruby-rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9. 1/yaml.rb:56:in
`<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
*** LOCAL GEMS ***
bundle (0.0.1)
bundler (1.7.4)
daemon_controller (1.2.0)
passenger (4.0.53)
rack (1.5.2)
rake (10.3.2)
On the production server, I have...
*** LOCAL GEMS ***
activemodel (4.0.0)
activerecord (4.0.0)
activerecord-deprecated_finders (1.0.3)
activerecord-mysql-adapter (0.0.1)
activesupport (4.0.0)
arel (4.0.0)
atomic (1.1.13)
bigdecimal (1.1.0)
builder (3.1.4)
bundler (1.3.5)
i18n (0.6.5)
io-console (0.3)
json (1.5.5)
minitest (4.7.5, 2.5.1)
multi_json (1.7.9)
mysql (2.9.1)
rake (0.9.2.2)
rdoc (3.9.5)
thread_safe (0.1.2)
tzinfo (0.3.37)
But again the list in the Gemfile.lock file lists many more. Just trying
to get a grasp of where to go from here, what is need to get this copy
to run, appreciate any help!
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/b1bbb746-9f48-4685-ba87-9921e43effda%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ruby on Rails developer for Expanding Start up (Ruby on Rails, Python, Clojure), London
Location: London, Farringdon
Salary: £35-70k plus Stock Options and Friday Lunch Club
Join Growing Dev Team at Highly Successful Start Up (Ruby on Rails, Python, Clojure)
The Company
The client is a start-up that aims to make space rental as easy as booking a hotel room. Their platform seamlessly connects landlords' vacant spaces to people with great ideas and their vision is to create a global network of spaces so people can make their idea travel. Founded only a couple of years ago this company now has a generous amount of funding and is expanding rapidly.
With the aim to go global this is a great time to join a growing company and be one of the first in the engineering team.
The Role
The stack uses Ruby for most of the backend and Rails, SCSS, Foundation & vanilla HS are the main frontend tools but they aren't dogmatic about language choice. They will consider people from a Ruby, Python or Clojure background and are open to using whatever language works best for the task in hand!
You will be helping to build software for the tenants, ensuring that they are matched to their ideal space and it is as easy as possible to create this process whilst avoiding pen and paper, and also the landlords who will want to use their space data to get an insight in the market.
Skills Required
· 3+ years' experience in RoR, Python or Clojure but you must be happy to work in RoR
· A can do attitude and willingness to work hard and help others
· Enthusiasm to join a growing team and help drive the company forward
Benefits
· Strong basic salary
· Your pick of apple hardware
· Stock options
· Small Company Culture
· Great office – diet coke on tap and group lunches on a friday
If this role interests you and you think that you could be a good match then please get in touch for more information:
Ysemay Hackett-Evans
[e] ysemay@oxfordknight.co.uk
[t] 02034755018
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/04e67379-cb98-427d-860a-663cf45eb9b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Johann Vazquez wrote in post #1161364:
> I have the same problema on Windows7, with the following code:
>
> This generates EMFILE Error (BINARY Mode):
> File.open(compiled_filename, "wb") do |f|
> f.puts(version)
> f.puts(sha)
> f.write(contents)
> end
>
> This one, NOT!! (TEXT Mode):
> File.open(compiled_filename, "w") do |f|
> f.puts(version)
> f.puts(sha)
> f.write(contents)
> end
>
> Everything was right and doing very well until 4 days ago... Looks like
> some Windows 7 system stuff changed or something but I'm not able to
> figure out what it is!
>
> What could it be??? HELP!!
It seems that some kind of malware stuff was interferring with my
application. I tested it on Windows "Secure Mode" and everything was
right (No EMFILE Error)... So I downloaded several antiviruses,
antimalwares, etc.... with no luck.
But, finally, "ADW Cleaner" did the job (running it under Windows
"Secure Mode"). Happuly, after that, no more EMFILE Error. End of the
story? I hope so...
--
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/6b20f91adae2cd52583dbda28952141c%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.
Hello everyone!!! It's that time again.
I would like to announce that Rails 3.2.20, 4.0.11, 4.1.7, and 4.2.0.beta3 have been released. These releases contain a security fix where the existence of arbitrary files on the file system can be leaked, but the contents of the file **will not** be leaked. The issue generally only impacts people who are using Rails to serve static assets, and will generally not impact people who use a proxy to serve static assets. You can read more about the issue [here (CVE-2014-7818)](https://groups.google.com/forum/#!topic/rubyonrails-security/dCp7duBiQgo). A release of sprockets has also been made to help with this issue. You can read about it [here (CVE-2014-7819)](https://groups.google.com/forum/#!topic/rubyonrails-security/wQBeGXqGs3E).
For ease of upgrading, the only changes in these releases are the security fixes.
Here are the checksums for the gems:
```
[aaron@TC release]$ shasum *3.2.20*
b14ca1ad923e035ab2a7785e657c5653447c3149 actionmailer-3.2.20.gem
d6fea767996a954e4bc95fd0ca101ec912fcb093 actionpack-3.2.20.gem
97f5bb424aee73fbbd319baab3fd35c3f5eeb5f4 activemodel-3.2.20.gem
32d76836675a4c88685c3904271b16d9d2338ce9 activerecord-3.2.20.gem
640d83a96accc24e6afcae3cc5b253e5d355983f activeresource-3.2.20.gem
d1d0a19a589c62278e7d9ac4275d5f8d75df20b3 activesupport-3.2.20.gem
f8b4d3c56d89760c02b37d4c67efd31dedd4df80 rails-3.2.20.gem
41c272d53dd748407210a2270ad17bc7c9f30594 railties-3.2.20.gem
[aaron@TC release]$ shasum *4.0.11*
9718b62f4428a7e4bbf66df4ac57dd82d197905a actionmailer-4.0.11.gem
f1aec3d29e781e3beb685852db00ecf495150077 actionpack-4.0.11.gem
2ba4ceeff0a76df850d6294e2e1da703f3f6e7cb activemodel-4.0.11.gem
714dca99a452adfec76b507241896ffd7978a254 activerecord-4.0.11.gem
2791791c5c1eeefb3eee76712656bf674a20867d activesupport-4.0.11.gem
56bb306d4f0309dcf3a804a97104a3ee26b64b94 rails-4.0.11.gem
243e265c879db8876cce8688374cb7f9bb752d7d railties-4.0.11.gem
[aaron@TC release]$ shasum *4.1.7*
4e4ce2530ff8773af784340e17e925b3b2c8cb20 actionmailer-4.1.7.gem
81628e433ca4335409677a33cfe9b56627f6ae1a actionpack-4.1.7.gem
7dc2626f5bc85379c55e49a712f5c0e060340ca8 actionview-4.1.7.gem
83c8be73d22973c843d43a988b27a449d2ca8a9d activemodel-4.1.7.gem
001156373c248a20c69bcf1451d6f7166dac3ddb activerecord-4.1.7.gem
217f25a911f8e89cd2834849232555cbc47ca850 activesupport-4.1.7.gem
a1d9bb181d718e7f6cf380136425444e627c2345 rails-4.1.7.gem
1b9c8d08afc8fa77786fef13c54d4e6985cdc6d6 railties-4.1.7.gem
[aaron@TC release]$ shasum *4.2.0*
e5d608e8ce32abdd73c73c91fd34cb8f7075a251 actionmailer-4.2.0.beta3.gem
2e2034c285943777ad325c35292e202a46b937c2 actionpack-4.2.0.beta3.gem
a008833cd1045c926fb6f36ee03e3d34499a0aa9 actionview-4.2.0.beta3.gem
02f4438363419c59b33d85b2dda4d4cf741a6098 activejob-4.2.0.beta3.gem
c8a7dc2134c885ad3b23d4c36be95abc1ec1b769 activemodel-4.2.0.beta3.gem
192e33ab3b9d54954ff834ce6ee7f67a9197cb36 activerecord-4.2.0.beta3.gem
00437ab52df0ed0dd9afe571d083c92c3cdbe361 activesupport-4.2.0.beta3.gem
ca81d6ac9fdd658775d32a6dbfe248ee13f5c87b rails-4.2.0.beta3.gem
cc302e363248e4bc2d245201f922c576f9fe6f15 railties-4.2.0.beta3.gem
```
Have a great day!!! <3
--
Aaron Patterson
http://tenderlovemaking.com/
Colin Law wrote:
> That tells you it is rails 4.0.0 as activemodel is one of the
> components. However, rather than seeing what versions are installed
> (there could be more than one version of the gems installed) look in
> the file Gemfile.lock in the applications root folder and you will see
> what versions it /requires/.
I have several GIT entries in the Gemfile.lock file and a list of gems
after the following lines, but this list looks much more extensive than
'gem list' shows ...
GEM
remote: https://rubygems.org/
specs:
<list of gems>
Then under DEPENDENCIES, I see ...
rails (= 3.2.13)
Does that explain my rails version? I don't see any references to 4.0.0.
> 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. A few days spend doing that will save you time
> in the long run.
Yes, I've already found that and been reading, thanks.
> If you want this for development work then I suggest you install rails
> using rvm [1]
> That will give you a complete working setup in a few minutes.
I used rvm to install same ruby-1.9.3-p392 as the VPS, following a doc
here...
https://www.digitalocean.com/community/tutorials/how-to-install-rails-apache-and-mysql-on-ubuntu-with-passenger
After all setup in Apache, I am getting this Passenger application error
in the browser....
cannot load such file -- bundler/setup (LoadError)
/usr/share/ruby-rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
/usr/share/ruby-rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
/usr/share/ruby-rvm/gems/ruby-1.9.3-p392/gems/passenger-4.0.53/lib/phusion_passenger/loader_shared_helpers.rb:263:in
`block in run_load_path_setup_code'
/usr/share/ruby-rvm/gems/ruby-1.9.3-p392/gems/passenger-4.0.53/lib/phusion_passenger/loader_shared_helpers.rb:366:in
`running_bundler'
/usr/share/ruby-rvm/gems/ruby-1.9.3-p392/gems/passenger-4.0.53/lib/phusion_passenger/loader_shared_helpers.rb:261:in
`run_load_path_setup_code'
/usr/share/ruby-rvm/gems/ruby-1.9.3-p392/gems/passenger-4.0.53/helper-scripts/rack-preloader.rb:100:in
`preload_app'
/usr/share/ruby-rvm/gems/ruby-1.9.3-p392/gems/passenger-4.0.53/helper-scripts/rack-preloader.rb:158:in
`<module:App>'
/usr/share/ruby-rvm/gems/ruby-1.9.3-p392/gems/passenger-4.0.53/helper-scripts/rack-preloader.rb:29:in
`<module:PhusionPassenger>'
/usr/share/ruby-rvm/gems/ruby-1.9.3-p392/gems/passenger-4.0.53/helper-scripts/rack-preloader.rb:28:in
`<main>'
Perhaps I need to get some more gems installed? I did a 'gem install
bundle' and still get the error. My gem list is this so far on the dev
server I am trying to setup, not sure if this error is affecting things
as well...
root@media:/etc/apache2# gem list
/usr/share/ruby-rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/yaml.rb:56:in
`<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
*** LOCAL GEMS ***
bundle (0.0.1)
bundler (1.7.4)
daemon_controller (1.2.0)
passenger (4.0.53)
rack (1.5.2)
rake (10.3.2)
On the production server, I have...
*** LOCAL GEMS ***
activemodel (4.0.0)
activerecord (4.0.0)
activerecord-deprecated_finders (1.0.3)
activerecord-mysql-adapter (0.0.1)
activesupport (4.0.0)
arel (4.0.0)
atomic (1.1.13)
bigdecimal (1.1.0)
builder (3.1.4)
bundler (1.3.5)
i18n (0.6.5)
io-console (0.3)
json (1.5.5)
minitest (4.7.5, 2.5.1)
multi_json (1.7.9)
mysql (2.9.1)
rake (0.9.2.2)
rdoc (3.9.5)
thread_safe (0.1.2)
tzinfo (0.3.37)
But again the list in the Gemfile.lock file lists many more. Just trying
to get a grasp of where to go from here, what is need to get this copy
to run, appreciate any help!
--
Robert
--
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/5452805C.5040701%40webtent.org.
For more options, visit https://groups.google.com/d/optout.
I just stumbled upon a behaviour about associations I do not really understand why Rails/ActiveRecord cannot get the connection. Using activerecord (4.2.0.beta2).
To describe it, lets work with theses models:
class User < ActiveRecord::Base
has_many :project_participations
has_many :projects, through: :project_participations, inverse_of: :users
end
class ProjectParticipation < ActiveRecord::Base
belongs_to :user
belongs_to :project
enum role: { member: 0, manager: 1 }
end
class Project < ActiveRecord::Base
has_many :project_participations
has_many :users, through: :project_participations, inverse_of: :projects
end
A user can participate in many projects with a role as a member or a manager. The connecting model is called ProjectParticipation.
I now have a problem using the associations on unsaved objects. The following commands work like I think they should work:
# first example
u = User.new
p = Project.new
u.projects << p
u.projects
=> #<ActiveRecord::Associations::CollectionProxy [#<Project id: nil>]>
u.project_participations
=> #<ActiveRecord::Associations::CollectionProxy [#<ProjectParticipation id: nil, user_id: nil, project_id: nil, role: nil>]>
So far so good - AR created the ProjectParticipation by itself and I can access the projects of a user with u.projects.
But it does not work if I create the ProjectParticipation by myself:
# second example
u = User.new
pp = ProjectParticipation.new
p = Project.new
pp.project = p # assign project to project_participation
u.project_participations << pp # assign project_participation to user
u.project_participations
=> #<ActiveRecord::Associations::CollectionProxy [#<ProjectParticipation id: nil, user_id: nil, project_id: nil, role: nil>]>
u.projects
=> #<ActiveRecord::Associations::CollectionProxy []>
Why are the projects empty? I cannot access the projects by u.projects like before, even the ProjectParticipation is there.But if I go through the participations directly, the project shows up:
u.project_participations.map(&:project)
=> [#<Project id: nil>]
Shouldn't it work like the first example directly:
u.projects returning me all projects not depending on whether I create the join object by myself or not? Or how can I make AR aware of this?
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/9ba0fd80-2b12-43a2-8c85-fc8eb2a6be16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Wednesday, 29 October 2014 18:17:10 UTC-4, john...@gmail.com wrote:
My boss is finally willing to listen to moving to a quality open sourced platform for our e-commerce web site, but she needs 'concrete examples' to believe that moving to ruby on rails is a good solution. And she needs 'e-commerce' pages (i.e. telling her twitter is built in rails doesn't impress her), preferably in the natural food industry.
We currently have a company that 'built' our website in PHP and we don't own our code, nor do we have access to the data (which drives me batty). They were recently purchased and the new owner is attempting to green mail us and it's an opportunity to get my boss to move to a better base where we own all the data and the code of the web site. I'm a 'pre-beginner' in rails. I know enough to get started, but not enough to build a truly dynamic website, let alone a fully functional e-commerce with a front and back end.
I was hoping people could give me some examples or a site that lists sites built in rails?
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/118721eb-d000-40b6-8378-f6e44fb3059a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On 30 October 2014 16:11, K.S. Koushik <koushik.rjn@gmail.com> wrote:
>
> This is the ruby code of the migration.
>
> (class CreateUsers < ActiveRecord::Migration
> def up
> create_table :users do |t|
> t.string "first_name",:limit =>25
> t.string "last_name", :limit =>50
> t.string "email",:default => "",:null => false
> t.string "password",:limit => 40
> t.timestamps
> end
> def down
> drop_table :users
> end
> end
> end)
> The terminal command
>
> (rake db:migrate VERSION=0)
>
> But i am still able to see the users table after running that terminal
> command. It says reverting CreateUsers but does not drop the table.
> Any help?
You have def down inside def up. It needs to be between the last two
end statements.
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%3D0gLvGgCptViSJ-%3DS_y0FOG_dkdDMhEkk9GX5-63oJ8%3D7JyQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
On Wednesday, October 29, 2014 10:17:10 PM UTC, john...@gmail.com wrote:
My boss is finally willing to listen to moving to a quality open sourced platform for our e-commerce web site, but she needs 'concrete examples' to believe that moving to ruby on rails is a good solution. And she needs 'e-commerce' pages (i.e. telling her twitter is built in rails doesn't impress her), preferably in the natural food industry.
We currently have a company that 'built' our website in PHP and we don't own our code, nor do we have access to the data (which drives me batty). They were recently purchased and the new owner is attempting to green mail us and it's an opportunity to get my boss to move to a better base where we own all the data and the code of the web site. I'm a 'pre-beginner' in rails. I know enough to get started, but not enough to build a truly dynamic website, let alone a fully functional e-commerce with a front and back end.
I was hoping people could give me some examples or a site that lists sites built in rails?
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/b592032a-6a7b-4a10-b105-47862c24bce5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Wednesday, October 29, 2014 6:17:10 PM UTC-4, john...@gmail.com wrote:
My boss is finally willing to listen to moving to a quality open sourced platform for our e-commerce web site, but she needs 'concrete examples' to believe that moving to ruby on rails is a good solution. And she needs 'e-commerce' pages (i.e. telling her twitter is built in rails doesn't impress her), preferably in the natural food industry.
We currently have a company that 'built' our website in PHP and we don't own our code, nor do we have access to the data (which drives me batty). They were recently purchased and the new owner is attempting to green mail us and it's an opportunity to get my boss to move to a better base where we own all the data and the code of the web site. I'm a 'pre-beginner' in rails. I know enough to get started, but not enough to build a truly dynamic website, let alone a fully functional e-commerce with a front and back end.
I was hoping people could give me some examples or a site that lists sites built in rails?
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/cb741a2a-172f-4897-be69-8ad9c3e096fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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/b69adc44-4f70-490e-a79e-8f1b5d957c8b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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/c8db2651-d6b5-43ac-b5e7-06283f6a9714%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I have the same problema on Windows7, with the following code:
This generates EMFILE Error (BINARY Mode):
File.open(compiled_filename, "wb") do |f|
f.puts(version)
f.puts(sha)
f.write(contents)
end
This one, NOT!! (TEXT Mode):
File.open(compiled_filename, "w") do |f|
f.puts(version)
f.puts(sha)
f.write(contents)
end
Everything was right and doing very well until 4 days ago... Looks like
some Windows 7 system stuff changed or something but I'm not able to
figure out what it is!
What could it be??? 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/fe32caf6e0778dc40e89c6a3a9429978%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.
On Wednesday, October 29, 2014 11:17:10 PM UTC+1, john...@gmail.com wrote:
My boss is finally willing to listen to moving to a quality open sourced platform for our e-commerce web site, but she needs 'concrete examples' to believe that moving to ruby on rails is a good solution. And she needs 'e-commerce' pages (i.e. telling her twitter is built in rails doesn't impress her), preferably in the natural food industry.
We currently have a company that 'built' our website in PHP and we don't own our code, nor do we have access to the data (which drives me batty). They were recently purchased and the new owner is attempting to green mail us and it's an opportunity to get my boss to move to a better base where we own all the data and the code of the web site. I'm a 'pre-beginner' in rails. I know enough to get started, but not enough to build a truly dynamic website, let alone a fully functional e-commerce with a front and back end.
I was hoping people could give me some examples or a site that lists sites built in rails?
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/94ff6a3d-a934-4e53-a6db-5f457e098d1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
We currently have a company that 'built' our website in PHP and we don't own our code, nor do we have access to the data (which drives me batty). They were recently purchased and the new owner is attempting to green mail us and it's an opportunity to get my boss to move to a better base where we own all the data and the code of the web site. I'm a 'pre-beginner' in rails. I know enough to get started, but not enough to build a truly dynamic website, let alone a fully functional e-commerce with a front and back end.
I was hoping people could give me some examples or a site that lists sites built in rails?
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/3ed360de-a5b0-465f-88c2-ae32135a7553%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On 29 October 2014 18:22, Robert Fitzpatrick <robert@webtent.org> wrote:
> I volunteer for a non-profit with a Ruby on Rails app and they recently lost
> their web developer. I have done a lot of programming from Perl to PHP and
> ASP, but never RoR. I've become somewhat familiar and been able to track
> down and make some cosmetic changes to some of the apps web pages, but I
> wanted to make sure what versions I'm dealing with and having a problem
> finding the Rails version. I found some instruction on how to determine and
> see we have ruby 1.9.3, but there is no rails command and not on the gems
> list, see below. How do I find my rails version?
>
> root@app01:~/www# ruby -v
> ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]
> root@app01:~/www# rails -v
> rbenv: rails: command not found
>
> The `rails' command exists in these Ruby versions:
> 1.9.3-p448
>
> root@app01:~/www# gem list
>
> *** LOCAL GEMS ***
>
> activemodel (4.0.0)
That tells you it is rails 4.0.0 as activemodel is one of the
components. However, rather than seeing what versions are installed
(there could be more than one version of the gems installed) look in
the file Gemfile.lock in the applications root folder and you will see
what versions it /requires/.
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. A few days spend doing that will save you time
in the long run.
>
> This install is on a Ubuntu VPS using the nginx web server, I would like to
> get a copy of the app running on a local Ubuntu server I have in my office,
> but I am only running Apache on it now and would like to possibly run the
> app on Apache versus installing nginx. Hopefully I can do that once I have
> all my version information, but I'm also reading several different ways to
> install Rails, and what is passenger? The service to start nginx on the VPS
> is nginx-passenger. Any advice on the best way for me to go about getting my
> own copy of the app running would be appreciated. I have a copy of its MySQL
> db copied and loaded already, just need to get the app working.
If you want this for development work then I suggest you install rails
using rvm [1]
That will give you a complete working setup in a few minutes.
Colin
[1]rvm.io
--
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%3D0gLuPrZ1EwZjeWPrUqbN%3DcXO9wfZUdQr82Q4LGC42GsFWTw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Em quarta-feira, 29 de outubro de 2014 14h27min45s UTC-2, Rodrigo Rosenfeld Rosas escreveu:
Hi there.I'm interested in extracting parts of my application to a local gem in vendor/gems. The reason I haven't done that yet is that I'm not sure about what would be the best way to handle auto-reloading for such gems...I'm pretty aware of the argument that if you're doing TDD you don't need auto-reloading, but still I'm interested in auto-reloading.I've taken a look at a few solutions like require_reloader and gem_reloader but I'd prefer to use some more robust approach if possible, as I wasn't much comfortable with their implementation...Is there any official way for developing Rails applications with local gems so that their code could be automatically reloaded in some robust/easy way?Thanks in advance,Rodrigo.
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/ed4d90f5-f09d-4aa8-bad7-ff516af1e191%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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/9f7376ef-5f93-4f56-b3b4-4c9c644f9838%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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/de736f35-b24f-4e34-a074-070f0b302dd4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Monday, 27 October 2014 21:17:38 UTC-4, Sonali Katara wrote:
I have a single table in which I store favourite dishes of users. A user can have more than one entries in the table. I have generated a view to show all the entries in the table but how do I create a view to show just the list of users. I don't have a table saving the users so I have to use DISTINCT to get the names of the users from my one and only table
I appraoched this by creating a new route
/foodsIlike/user_list
get '/foodsIlike/user_list' => 'foodsIlike#user_list', :as => 'user_list'instead of going to the user_list it tries to find a record with :id=user_list as that is what it would do to show one record
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/bf73e36a-3369-4f24-846a-599db950b5f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hey! Would you accept an international coder from the sunny part of
europe? If so PM, so I can send you my website and portfolio.
--
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/a98431e29e543b63f1a72f4f2b9b2961%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.
I have experience in Rails 2.3.x and 3.x and 4, ruby 1.8.x/1.9.x/2.x, Rspec, Cucumber, Test::Unit,
Minitest, Vagrant, Git, HAML, HTML5, CSS3, CoffeeScript, Javascript, jQuery, Angularjs, Agile Methodologies, PostgreSQL, Mysql etc.
Link to my github profile.(https://github.com/
Link to my StackOverflow profile(http://stackoverflow.
Link to codementor profile(https://www.
Link to rubygems profile(https://rubygems.org/
On Friday, August 23, 2013 4:39:21 PM UTC+5:30, Kévin Etienne wrote:
We are seeking an assistant software developer to support our development
Experience of Ruby and Rails, PostgreSQL, coffeescript, jquery would be be preferential and Java for Android would be beneficial. We will consider candidates without Ruby on Rails experience, but must have a willingness to learn. Must be well-organised and have strong professional skills as you be interacting with client requests. Interest in environmental innovation desired.
We are a fast growing company that has spin-out of research from Oxford University that is bringing innovative solutions for improving car and building energy performance.
We have several commercially ready software applications and a pipeline of new products currently in research and development. We are looking for a London or Oxford-based developer able to give 30-50 hours a month and there is opportunity for growth.
Start date: September. Please send cv to: kevin.etienne(at)pilio-ltd.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/631bc537-5293-4a56-a2f0-4c89c237ef38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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/CAEGezZX-Mc_H%3DYC3aYHYt2GjeLp-Dr5BnDL7dREMTfZh-ZmuYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
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/a790341b-2c5d-4dea-9172-18b02145c9e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
http://arubystory.blogspot.gr/2014/10/testing-execution-of-beforefilter-with.html
Does this approach seem valid to you?
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/f25918d1-a4ec-4ba8-82e4-838ea462edd1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
class CreateContacts < ActiveRecord::Migrationdef changecreate_table :contacts do |t|t.string :namet.string :phone_numbert.string :email
t.timestampsendendend
On Tuesday, October 28, 2014 4:07:14 PM UTC+3, Jason FB wrote:
There's a good explanation here: http://stackoverflow.com/questions/3928275/in-ruby- on-rails-whats-the-difference- between-datetime-timestamp- time-and-da are you sure you guys are running the same version of Postgres?What does your actual migration file look like?-JasonOn Oct 28, 2014, at 7:51 AM, bertly_the_coder <muc...@gmail.com> wrote:Hi group,We're working as a team of programmers and for most of us, when we run rake db:migrate, we get our datetime columns to show up with the datetime datatype in the schema.rb file, but for others, when they run rake db:migrate, these columns show up as timestamp in the schema.rb file.(See example below). We're all on Ruby 2.1.0 and Rails 4.0.9 and using Postgres for our DB. I know that as far as the postgres goes, it treats both timestamp and datetime the same, but is there anyway to fix this? Is there a setting that needs to be changed?example:create_table "contacts", force: true do |t|
t.string "name"
t.string "phone_number"
t.string "email"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "user_id"
t.string "uuid"
t.text "log"
endVScreate_table "contacts", force: true do |t|t.string "name"t.string "phone_number"t.string "email"t.timestamp "created_at"t.timestamp "updated_at"t.integer "user_id"t.string "uuid"t.text "log"end--
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-ta...@googlegroups.com .
To post to this group, send email to rubyonra...@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ .032af631-cff0-4bf0-9237- 85017f2f94d3%40googlegroups. com
For more options, visit https://groups.google.com/d/optout .
----Jason Fleetwood-BoldtAll material © Jason Fleetwood-Boldt 2014. Public conversations may be turned into blog posts (original poster information will be made anonymous). Email ja...@datatravels.com with questions/concerns about this.
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/7652e251-b539-4bb7-9342-301312978248%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.