Search Results

Search found 3 results on 1 pages for 'user369759'.

Page 1/1 | 1 

  • How to import RoR project to Netbeans

    - by user369759
    I have very simple (in fact empty ) project which i have created by rails new MyProject command from command-line. So, i want to import it to NetBeans IDE. I click "new project" - "RoR" - "from existing source", select Ruby 1.9.2 (instead of embedded JRuby) in the wizard form. After that i have got errors [see the picture below]: So.. i click OK. And then try to run the RoR application from NetBeans clicking on the run-button and i got the following error in the log-panel: /home/ses/.rvm/rubies/ruby-1.9.2-p136/bin/ruby: No such file or directory -- script/server (LoadError) So how to handle these two problems? and, replying the comment to my question. yes, i performed following commands: bundle install Using rake (0.8.7) Using abstract (1.0.0) Using activesupport (3.0.3) Using builder (2.1.2) Using i18n (0.5.0) Using activemodel (3.0.3) Using erubis (2.6.6) Using rack (1.2.1) Using rack-mount (0.6.13) Using rack-test (0.5.7) Using tzinfo (0.3.24) Using actionpack (3.0.3) Using mime-types (1.16) Using polyglot (0.3.1) Using treetop (1.4.9) Using mail (2.2.15) Using actionmailer (3.0.3) Using arel (2.0.7) Using activerecord (3.0.3) Using activeresource (3.0.3) Using bundler (1.0.10) Using mysql2 (0.2.6) Using thor (0.14.6) Using railties (3.0.3) Using rails (3.0.3) p.s. my application is working when i launch it from the console. i use ruby-1.9.2 and RoR 3.0 and Netbeans 6.9.1 and Ubuntu 10.10 bundle pack Using rake (0.8.7) Using abstract (1.0.0) Using activesupport (3.0.3) Using builder (2.1.2) Using i18n (0.5.0) Using activemodel (3.0.3) Using erubis (2.6.6) Using rack (1.2.1) Using rack-mount (0.6.13) Using rack-test (0.5.7) Using tzinfo (0.3.24) Using actionpack (3.0.3) Using mime-types (1.16) Using polyglot (0.3.1) Using treetop (1.4.9) Using mail (2.2.15) Using actionmailer (3.0.3) Using arel (2.0.7) Using activerecord (3.0.3) Using activeresource (3.0.3) Using bundler (1.0.10) Using mysql2 (0.2.6) Using thor (0.14.6) Using railties (3.0.3) Using rails (3.0.3) Updating .gem files in vendor/cache Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. Updating .gem files in vendor/cache

    Read the article

  • many to many and integrity when saving the null

    - by user369759
    I have two classes Software, Tag - they are related by ManyToMany. We CAN NOT create Software without putting the Tag to it. I want to write a test which check that: @Test public void createSoftwareWithNullTags() { List<Tag> tags = null; Software software = new Software("software1", "description1", tags); try { software.save(); fail("tags should not be null"); } catch (Exception ex) { // NEVER COME HERE !!! } } So, this test fails. I guess it is not good test for that case - because it even do not try to SAVE data to SOFTWARE_TAG table. Of course i could do validation manually but i want implement it with hibernate, using some annotation or something. Is it possible? Or how would you do this? My entities: @Entity public class Tag extends Model { public String title; public Tag(String title) { this.title = title; } @ManyToMany( cascade = {CascadeType.ALL}, mappedBy = "tags", targetEntity = Software.class ) public List<Software> softwares; } @Entity public class Software extends Model { public String title; public String description; @ManyToOne(optional = false) public Author author; @ManyToMany(cascade = CascadeType.ALL) @JoinTable( name = "SOFTWARE_TAG", joinColumns = @JoinColumn(name = "Software_id"), inverseJoinColumns = @JoinColumn(name = "Tag_id") ) public List<Tag> tags; public Software(String title, String description, Author author, List<Tag> tags) { this.title = title; this.description = description; this.author = author; this.tags = tags; } }

    Read the article

  • how to made one-to-one bidirectional relationships in grails?

    - by user369759
    I have two domain classes and want to have one-to-one BIDIRECTIONAL relation between them. I write: class Person { Book book; String name Integer age Date lastVisit static constraints = { book unique: true // "one-to-one". Without that = "Many-to-one". } } class Book { String title Date releaseDate String ISBN static belongsTo = [person:Person] // it makes relationship bi-directional regarding the grails-docs } So, i want to have bi-directional, i could NOT find link from Book to Person in generated SQL: CREATE TABLE `book` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `version` bigint(20) NOT NULL, `isbn` varchar(255) NOT NULL, `release_date` datetime NOT NULL, `title` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 So then it means it is not bidirectional then? How to make bidirectional?

    Read the article

1