Launch rails webrick server at startupHow do I start applications automatically on login?execute script after desktop loaded?rails & libpq-dev nasty dependenciesHow to start a never ending script at startupparse_rackup_file': rackup file (config.ru) not readable (ArgumentError) Unicorn Nginxerror while running ruby application at system startup in ubuntuRun Android Studio on reboot using shell scriptHow to autostart node forever and use spawn() as sudo on Ubuntu?Start script on system startup (Ubuntu 16.04.1)

Can a trainer send me a gift every day without opening my gift?

Responsibility for arrangement of elements - frontend or backend?

How could a sequence of random dates be generated, given year interval?

Why did the police not show up at Brett's apartment during the shootout?

How does kinetic energy work in braking a vehicle?

Why did the people of Zion never find evidence of the previous cycles?

What is this second smaller runway next to London City Airport?

What does /r mean in a score?

Regular sized fonts in oubraces package

How to deal with non-stop callers in the service desk

Why does Mainland China and Taiwan require Visas for each other's citizens?

Why do microwaves use magnetron?

apache httpd process be killed by kernel oom

How should I add a bit of space below a substack in an overset?

Is CR12 too difficult for two level 4 characters?

How much caffeine would there be if I reuse tea leaves in a second brewing?

How short does a trip need to be before flying is less safe than other forms of transportation?

How do functional equations for zeta functions arise from the structure of a homology group?

Coworkers accusing me of "cheating" for working more efficiently

Why would Climate activists disrupt public transport?

Why are so many cities in the list of 50 most violent cities in the world located in South and Central America?

A question on limit of integrals of "truncated" functions

For a command to increase something, should instructions refer to the "+" key or the "=" key?

Is it bizarre that a professor asks every student for a 3 inch by 5 inch photograph?



Launch rails webrick server at startup


How do I start applications automatically on login?execute script after desktop loaded?rails & libpq-dev nasty dependenciesHow to start a never ending script at startupparse_rackup_file': rackup file (config.ru) not readable (ArgumentError) Unicorn Nginxerror while running ruby application at system startup in ubuntuRun Android Studio on reboot using shell scriptHow to autostart node forever and use spawn() as sudo on Ubuntu?Start script on system startup (Ubuntu 16.04.1)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









2

















I want webrick running at startup. So I execute this command in terminal:



crontab -e


Then added this line to the end of the file



@reboot /home/myname/.rvm/rubies/ruby-2.0.0-head/bin/ruby /home/myname/redmine-2.3.1/script/rails server webrick -e production


and restarted Ubuntu. However, the server still didn't start when my Ubuntu booted.



Any help on this problem?










share|improve this question


































    2

















    I want webrick running at startup. So I execute this command in terminal:



    crontab -e


    Then added this line to the end of the file



    @reboot /home/myname/.rvm/rubies/ruby-2.0.0-head/bin/ruby /home/myname/redmine-2.3.1/script/rails server webrick -e production


    and restarted Ubuntu. However, the server still didn't start when my Ubuntu booted.



    Any help on this problem?










    share|improve this question






























      2












      2








      2








      I want webrick running at startup. So I execute this command in terminal:



      crontab -e


      Then added this line to the end of the file



      @reboot /home/myname/.rvm/rubies/ruby-2.0.0-head/bin/ruby /home/myname/redmine-2.3.1/script/rails server webrick -e production


      and restarted Ubuntu. However, the server still didn't start when my Ubuntu booted.



      Any help on this problem?










      share|improve this question

















      I want webrick running at startup. So I execute this command in terminal:



      crontab -e


      Then added this line to the end of the file



      @reboot /home/myname/.rvm/rubies/ruby-2.0.0-head/bin/ruby /home/myname/redmine-2.3.1/script/rails server webrick -e production


      and restarted Ubuntu. However, the server still didn't start when my Ubuntu booted.



      Any help on this problem?







      bash startup rails






      share|improve this question
















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jul 6 '13 at 17:12









      Karthik C

      1,9795 gold badges16 silver badges24 bronze badges




      1,9795 gold badges16 silver badges24 bronze badges










      asked Jul 6 '13 at 16:29









      petwhopetwho

      1261 silver badge7 bronze badges




      1261 silver badge7 bronze badges























          1 Answer
          1






          active

          oldest

          votes


















          0


















          I think the right way is to add this two lines in crontab:



          PATH = /home/myname/.rvm/rubies/ruby-2.0.0-head/bin:$PATH
          @reboot ruby script/rails server webrick -e production


          Or, better, use this post to start webrick automatically on login.






          share|improve this answer




























          • Radeanu thanks for your answer but they both are not working for me. Any other idea?

            – petwho
            Jul 7 '13 at 15:33











          • @petwho Can you start it from terminal? If yes, how?

            – Radu Rădeanu
            Jul 7 '13 at 15:48











          • I am not sure what do you mean by starting it from terminal. However, I tried both on terminal and GUI approaches. For GUI approach (which you linked on your answer): I entered this line: "/home/myname/.rvm/rubies/ruby-2.0.0-head/bin/ruby /home/myname/redmine-2.3.1/script/rails server webrick -e production &" to "command" field (and event removed the ampersand character at the end of the command). They both not working. I also added "x" permission to all users to file under ~/.config/autostart/webrick and /etc/rc.local. I'm really getting hairy with this.

            – petwho
            Jul 8 '13 at 2:59













          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );














          draft saved

          draft discarded
















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f317133%2flaunch-rails-webrick-server-at-startup%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown


























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0


















          I think the right way is to add this two lines in crontab:



          PATH = /home/myname/.rvm/rubies/ruby-2.0.0-head/bin:$PATH
          @reboot ruby script/rails server webrick -e production


          Or, better, use this post to start webrick automatically on login.






          share|improve this answer




























          • Radeanu thanks for your answer but they both are not working for me. Any other idea?

            – petwho
            Jul 7 '13 at 15:33











          • @petwho Can you start it from terminal? If yes, how?

            – Radu Rădeanu
            Jul 7 '13 at 15:48











          • I am not sure what do you mean by starting it from terminal. However, I tried both on terminal and GUI approaches. For GUI approach (which you linked on your answer): I entered this line: "/home/myname/.rvm/rubies/ruby-2.0.0-head/bin/ruby /home/myname/redmine-2.3.1/script/rails server webrick -e production &" to "command" field (and event removed the ampersand character at the end of the command). They both not working. I also added "x" permission to all users to file under ~/.config/autostart/webrick and /etc/rc.local. I'm really getting hairy with this.

            – petwho
            Jul 8 '13 at 2:59
















          0


















          I think the right way is to add this two lines in crontab:



          PATH = /home/myname/.rvm/rubies/ruby-2.0.0-head/bin:$PATH
          @reboot ruby script/rails server webrick -e production


          Or, better, use this post to start webrick automatically on login.






          share|improve this answer




























          • Radeanu thanks for your answer but they both are not working for me. Any other idea?

            – petwho
            Jul 7 '13 at 15:33











          • @petwho Can you start it from terminal? If yes, how?

            – Radu Rădeanu
            Jul 7 '13 at 15:48











          • I am not sure what do you mean by starting it from terminal. However, I tried both on terminal and GUI approaches. For GUI approach (which you linked on your answer): I entered this line: "/home/myname/.rvm/rubies/ruby-2.0.0-head/bin/ruby /home/myname/redmine-2.3.1/script/rails server webrick -e production &" to "command" field (and event removed the ampersand character at the end of the command). They both not working. I also added "x" permission to all users to file under ~/.config/autostart/webrick and /etc/rc.local. I'm really getting hairy with this.

            – petwho
            Jul 8 '13 at 2:59














          0














          0










          0









          I think the right way is to add this two lines in crontab:



          PATH = /home/myname/.rvm/rubies/ruby-2.0.0-head/bin:$PATH
          @reboot ruby script/rails server webrick -e production


          Or, better, use this post to start webrick automatically on login.






          share|improve this answer
















          I think the right way is to add this two lines in crontab:



          PATH = /home/myname/.rvm/rubies/ruby-2.0.0-head/bin:$PATH
          @reboot ruby script/rails server webrick -e production


          Or, better, use this post to start webrick automatically on login.







          share|improve this answer















          share|improve this answer




          share|improve this answer








          edited Apr 13 '17 at 12:23









          Community♦

          1




          1










          answered Jul 6 '13 at 19:48









          Radu RădeanuRadu Rădeanu

          128k37 gold badges270 silver badges336 bronze badges




          128k37 gold badges270 silver badges336 bronze badges















          • Radeanu thanks for your answer but they both are not working for me. Any other idea?

            – petwho
            Jul 7 '13 at 15:33











          • @petwho Can you start it from terminal? If yes, how?

            – Radu Rădeanu
            Jul 7 '13 at 15:48











          • I am not sure what do you mean by starting it from terminal. However, I tried both on terminal and GUI approaches. For GUI approach (which you linked on your answer): I entered this line: "/home/myname/.rvm/rubies/ruby-2.0.0-head/bin/ruby /home/myname/redmine-2.3.1/script/rails server webrick -e production &" to "command" field (and event removed the ampersand character at the end of the command). They both not working. I also added "x" permission to all users to file under ~/.config/autostart/webrick and /etc/rc.local. I'm really getting hairy with this.

            – petwho
            Jul 8 '13 at 2:59


















          • Radeanu thanks for your answer but they both are not working for me. Any other idea?

            – petwho
            Jul 7 '13 at 15:33











          • @petwho Can you start it from terminal? If yes, how?

            – Radu Rădeanu
            Jul 7 '13 at 15:48











          • I am not sure what do you mean by starting it from terminal. However, I tried both on terminal and GUI approaches. For GUI approach (which you linked on your answer): I entered this line: "/home/myname/.rvm/rubies/ruby-2.0.0-head/bin/ruby /home/myname/redmine-2.3.1/script/rails server webrick -e production &" to "command" field (and event removed the ampersand character at the end of the command). They both not working. I also added "x" permission to all users to file under ~/.config/autostart/webrick and /etc/rc.local. I'm really getting hairy with this.

            – petwho
            Jul 8 '13 at 2:59

















          Radeanu thanks for your answer but they both are not working for me. Any other idea?

          – petwho
          Jul 7 '13 at 15:33





          Radeanu thanks for your answer but they both are not working for me. Any other idea?

          – petwho
          Jul 7 '13 at 15:33













          @petwho Can you start it from terminal? If yes, how?

          – Radu Rădeanu
          Jul 7 '13 at 15:48





          @petwho Can you start it from terminal? If yes, how?

          – Radu Rădeanu
          Jul 7 '13 at 15:48













          I am not sure what do you mean by starting it from terminal. However, I tried both on terminal and GUI approaches. For GUI approach (which you linked on your answer): I entered this line: "/home/myname/.rvm/rubies/ruby-2.0.0-head/bin/ruby /home/myname/redmine-2.3.1/script/rails server webrick -e production &" to "command" field (and event removed the ampersand character at the end of the command). They both not working. I also added "x" permission to all users to file under ~/.config/autostart/webrick and /etc/rc.local. I'm really getting hairy with this.

          – petwho
          Jul 8 '13 at 2:59






          I am not sure what do you mean by starting it from terminal. However, I tried both on terminal and GUI approaches. For GUI approach (which you linked on your answer): I entered this line: "/home/myname/.rvm/rubies/ruby-2.0.0-head/bin/ruby /home/myname/redmine-2.3.1/script/rails server webrick -e production &" to "command" field (and event removed the ampersand character at the end of the command). They both not working. I also added "x" permission to all users to file under ~/.config/autostart/webrick and /etc/rc.local. I'm really getting hairy with this.

          – petwho
          Jul 8 '13 at 2:59



















          draft saved

          draft discarded















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid …


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f317133%2flaunch-rails-webrick-server-at-startup%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown









          Popular posts from this blog

          Distance measures on a map of a game The 2019 Stack Overflow Developer Survey Results Are Inmin distance in a graphShortest distance path on contour plotHow to plot a tilted map?Finding points outside of a diskDelaunay link distanceAnnulus from GeoDisks: drawing a ring on a mapNegative Correlation DistanceFind distance along a path (GPS coordinates)Finding position at given distance in a GeoPathMathematics behind distance estimation using camera

          Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?

          apt-get update fails to fetch files, “Temporary failure resolving …” errorWhy does apt-get fail to resolve the mirror?Apt-get update not working in Ubuntu 16.04 “temporary failure resolving”Ubuntu 16.04 Server updates - Temporary failure resolving 'ro.archive.ubuntu.com'“Failed to fetch… Temporary failure resolving…” when trying to installTemporary failure resolving ca.archive.ubuntu.comUbuntu 18.04 sudo apt update doesn't work (Failed to Fetch)apt-get error: “Temporary failure resolving 'archive.ubuntu.com' ”“Temporary failure resolving us.archive.ubuntu.com” Live USB rescueTemporary failure resolving 'es.archive.ubuntu.com' on Ubuntu Server15.04 Server fails to update with failed to fetch temporary failure resolving errorsCan't install software from Software CenterApt-get failed to fetch from Ubuntu server with error code 404“Unable to connect” error with apt-get: possible proxy?v12.10 can't apt-get update111: Connection refused when trying apt updateSudo apt-get update